-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add support for Scriptable BERT tokenizer #1707
Merged
+60,094
−1
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
873fc43
add classes
parmeet 914cf71
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet 82ac4d2
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet f17cc21
add basic functions
parmeet 06ec41b
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet 4276030
minor updates
parmeet e39826e
minor update
parmeet aaad788
added submodule
parmeet 4f892e1
initial run
parmeet ef1b1f7
added pybinded transform and test structure
parmeet 9414cda
fixed few bugs
parmeet ae6206b
fixed _is_control
parmeet aa543af
using python strip and removing it from C++
parmeet 67c452f
fix UString type
parmeet d442d86
partially add code for scripting
parmeet 434c002
add support for scripting
parmeet 74f1231
minor edit
parmeet e67b513
minor edit
parmeet 70d0fc8
remove chinese punctuation
parmeet 3a27236
fix lint
parmeet 1a77b8b
fix lint
parmeet a0caeb1
adding to_lower option
parmeet 5cf80a1
Revert "adding to_lower option"
parmeet d0b4e7d
add to_lower option, need to fix unit test
parmeet 653515c
update to_lower
parmeet 806d67e
fix upper case tests
parmeet fc0a608
modify test suit
parmeet c26fb4b
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet 2dd48ac
minor edits
parmeet 9e4c098
fixed linter
parmeet ab177ea
undo changes in clip test
parmeet fa498e5
add fix for 3332 code point
parmeet 6de32f1
fix lint
parmeet 9b2038b
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet 0a64f89
fix doc strings and C++ contructor initializer list
parmeet 2387924
fix lint
parmeet 5900bdf
Merge branch 'main' of github.com:pytorch/text into bert_tokenizer
parmeet abd81fc
Revert "fix doc strings and C++ contructor initializer list"
parmeet d940ecb
re-address comments w.r.t revert
parmeet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "adding to_lower option"
This reverts commit a0caeb1.
commit 5cf80a1ab0c5487137031ab68a827aa1f63f0e50
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using
std::basic_string
here because the text being passed in from Python contains unicode which isn't compatible withstd::string
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string passed from python is UTF-8 encoded bytes. UString is the container to store the unicode code points when converting string to unicode and vice-versa.