Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@saltacc
Copy link
Contributor

@saltacc saltacc commented Dec 8, 2022

Previously, the merge indice calculation could fail rather easily, and didn't work with underscores. Now you can have things such as underscores in the middle of words (or at all), quotation marks, every symbol but a space in your search. The previous code would fail with a prompt such as hololive, amane_kanata, 1girl, angel_wings, hairclip, blue eyes and searching for angel_wings, as it would become angel</w> _</w> wings</w>, and the code couldn't handle punctuation anywhere but the end.

Fixed behavior with token merge indice calculation when it comes to punctuation and numbers
Fixed searching for underscores and made the searching more robust. Had to update this code to work with the commit that went through while I was making it.
Copy link
Member

@daemon daemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. I was planning to address it at some point, but you beat me to the punch.

@daemon daemon merged commit 854e6dd into castorini:main Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants