Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
562b9983
"vscode:/vscode.git/clone" did not exist on "48a0c17a3d233dd835d8cdd9508f6f4e3d03dcc6"
Unverified
Commit
562b9983
authored
Aug 20, 2019
by
Guillem García Subies
Committed by
GitHub
Aug 20, 2019
Browse files
Update tokenization_openai.py
parent
bb044462
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
pytorch_transformers/tokenization_openai.py
pytorch_transformers/tokenization_openai.py
+1
-0
No files found.
pytorch_transformers/tokenization_openai.py
View file @
562b9983
...
...
@@ -92,6 +92,7 @@ class OpenAIGPTTokenizer(PreTrainedTokenizer):
from
spacy.lang.en
import
English
_nlp
=
English
()
self
.
nlp
=
nlp
.
Defaults
.
create_tokenizer
(
_nlp
)
self
.
fix_text
=
ftfy
.
fix_text
except
ImportError
:
logger
.
warning
(
"ftfy or spacy is not installed using BERT BasicTokenizer instead of SpaCy & ftfy."
)
self
.
nlp
=
BasicTokenizer
(
do_lower_case
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment