Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: better tokenization #266

Merged
merged 2 commits into from
Jan 19, 2023
Merged

fix: better tokenization #266

merged 2 commits into from
Jan 19, 2023

Conversation

rarkins
Copy link
Contributor

@rarkins rarkins commented Jan 19, 2023

fix search

@TWiStErRob
Copy link

Wait, don't revert the whole thing, you just want to remove the case-switch tokenization.

@TWiStErRob
Copy link

-separator: '[\s\-,:!?=\[\]()<>{}"/\\]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;'
+separator: '[\s\-,:!?=\[\]()<>{}"/\\]+|\.(?!\d)|&[lg]t;'

@TWiStErRob
Copy link

TWiStErRob commented Jan 19, 2023

The part (?!\b)(?=[A-Z][a-z]) is responsible for splitting up fooBar into foo and bar, which gives relevant results when people don't know the whole thing. e.g.
image

this was not possible before either, so removing just this small part will restore what you were used to in addition keeping the majority of the fix for #264

@rarkins
Copy link
Contributor Author

rarkins commented Jan 19, 2023

@HonkingGoose @viceice wdyt?

@HonkingGoose
Copy link
Collaborator

I'll defer to people that actually know regex, I just copy pasted the regex from @TWiStErRob 😄

If you know the exact term, you should be able to find it with the search. And you should also be able to find partial matches.

mkdocs.yml Outdated Show resolved Hide resolved
Co-authored-by: Róbert Papp <papp.robert.s@gmail.com>
mkdocs.yml Show resolved Hide resolved
@viceice viceice changed the title Revert "chore: setup tokenization" fix: better tokenization Jan 19, 2023
@rarkins rarkins merged commit 245251d into main Jan 19, 2023
@rarkins rarkins deleted the revert-265-search-tokens branch January 19, 2023 13:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants