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
cd40cb88
Unverified
Commit
cd40cb88
authored
May 11, 2020
by
Lysandre Debut
Committed by
GitHub
May 11, 2020
Browse files
Fix special token doc (#4292)
parent
82601f4c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
src/transformers/tokenization_albert.py
src/transformers/tokenization_albert.py
+1
-1
src/transformers/tokenization_bert.py
src/transformers/tokenization_bert.py
+1
-1
src/transformers/tokenization_camembert.py
src/transformers/tokenization_camembert.py
+1
-1
src/transformers/tokenization_roberta.py
src/transformers/tokenization_roberta.py
+1
-1
src/transformers/tokenization_xlm.py
src/transformers/tokenization_xlm.py
+1
-1
src/transformers/tokenization_xlm_roberta.py
src/transformers/tokenization_xlm_roberta.py
+1
-1
src/transformers/tokenization_xlnet.py
src/transformers/tokenization_xlnet.py
+1
-1
No files found.
src/transformers/tokenization_albert.py
View file @
cd40cb88
...
@@ -274,7 +274,7 @@ class AlbertTokenizer(PreTrainedTokenizer):
...
@@ -274,7 +274,7 @@ class AlbertTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
...
...
src/transformers/tokenization_bert.py
View file @
cd40cb88
...
@@ -269,7 +269,7 @@ class BertTokenizer(PreTrainedTokenizer):
...
@@ -269,7 +269,7 @@ class BertTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
...
...
src/transformers/tokenization_camembert.py
View file @
cd40cb88
...
@@ -182,7 +182,7 @@ class CamembertTokenizer(PreTrainedTokenizer):
...
@@ -182,7 +182,7 @@ class CamembertTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
if
token_ids_1
is
not
None
:
if
token_ids_1
is
not
None
:
...
...
src/transformers/tokenization_roberta.py
View file @
cd40cb88
...
@@ -193,7 +193,7 @@ class RobertaTokenizer(GPT2Tokenizer):
...
@@ -193,7 +193,7 @@ class RobertaTokenizer(GPT2Tokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
if
token_ids_1
is
not
None
:
if
token_ids_1
is
not
None
:
...
...
src/transformers/tokenization_xlm.py
View file @
cd40cb88
...
@@ -893,7 +893,7 @@ class XLMTokenizer(PreTrainedTokenizer):
...
@@ -893,7 +893,7 @@ class XLMTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
...
...
src/transformers/tokenization_xlm_roberta.py
View file @
cd40cb88
...
@@ -217,7 +217,7 @@ class XLMRobertaTokenizer(PreTrainedTokenizer):
...
@@ -217,7 +217,7 @@ class XLMRobertaTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
...
...
src/transformers/tokenization_xlnet.py
View file @
cd40cb88
...
@@ -278,7 +278,7 @@ class XLNetTokenizer(PreTrainedTokenizer):
...
@@ -278,7 +278,7 @@ class XLNetTokenizer(PreTrainedTokenizer):
Set to True if the token list is already formatted with special tokens for the model
Set to True if the token list is already formatted with special tokens for the model
Returns:
Returns:
:obj:`List[int]`: A list of integers in the range [0, 1]:
0
for a special token,
1
for a sequence token.
:obj:`List[int]`: A list of integers in the range [0, 1]:
1
for a special token,
0
for a sequence token.
"""
"""
if
already_has_special_tokens
:
if
already_has_special_tokens
:
...
...
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