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
388e3251
Unverified
Commit
388e3251
authored
Aug 20, 2019
by
Guillem García Subies
Committed by
GitHub
Aug 20, 2019
Browse files
Update tokenization_xlm.py
parent
f5e2ed0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch_transformers/tokenization_xlm.py
pytorch_transformers/tokenization_xlm.py
+1
-1
No files found.
pytorch_transformers/tokenization_xlm.py
View file @
388e3251
...
@@ -126,7 +126,7 @@ class XLMTokenizer(PreTrainedTokenizer):
...
@@ -126,7 +126,7 @@ class XLMTokenizer(PreTrainedTokenizer):
import
ftfy
import
ftfy
from
spacy.lang.en
import
English
from
spacy.lang.en
import
English
_nlp
=
English
()
_nlp
=
English
()
self
.
nlp
=
nlp
.
Defaults
.
create_tokenizer
(
_nlp
)
self
.
nlp
=
_
nlp
.
Defaults
.
create_tokenizer
(
_nlp
)
self
.
fix_text
=
ftfy
.
fix_text
self
.
fix_text
=
ftfy
.
fix_text
except
ImportError
:
except
ImportError
:
logger
.
warning
(
"ftfy or spacy is not installed using BERT BasicTokenizer instead of SpaCy & ftfy."
)
logger
.
warning
(
"ftfy or spacy is not installed using BERT BasicTokenizer instead of SpaCy & ftfy."
)
...
...
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