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

Huggingface Tokenizer Analyzer Pyserini Binding #1377

Merged
merged 4 commits into from
Dec 8, 2022

Conversation

ToluClassics
Copy link
Member

No description provided.

Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

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

Can we please add a test case?

Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

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

minor nit - please fix and then go ahead and merge

self.assertTrue(isinstance(analyzer, Analyzer))
tokens = analyzer.analyze('This tokenizer generates wordpiece tokens')
self.assertEqual(tokens, ['this', 'token', '##izer', 'generates', 'word', '##piece', 'token', '##s'])

Copy link
Member

Choose a reason for hiding this comment

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

minor nit - I think PEP8 only wants two blank lines...

@ToluClassics ToluClassics merged commit f5a73f0 into castorini:master Dec 8, 2022
@ToluClassics ToluClassics deleted the hgf_set_analyzer branch December 8, 2022 16:02
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