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
865d4d59
"examples/vscode:/vscode.git/clone" did not exist on "32d2031458b34fd3073d5fcac99a4124913dc8a1"
Commit
865d4d59
authored
May 20, 2020
by
Julien Chaumond
Browse files
[ci] Close #4481
parent
a3af8e86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
tests/test_tokenization_bert_japanese.py
tests/test_tokenization_bert_japanese.py
+2
-3
No files found.
tests/test_tokenization_bert_japanese.py
View file @
865d4d59
...
...
@@ -26,7 +26,7 @@ from transformers.tokenization_bert_japanese import (
)
from
.test_tokenization_common
import
TokenizerTesterMixin
from
.utils
import
custom_tokenizers
,
slow
from
.utils
import
custom_tokenizers
@
custom_tokenizers
...
...
@@ -126,7 +126,6 @@ class BertJapaneseTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
self
.
assertListEqual
(
tokenizer
.
tokenize
(
"こんばんは こんばんにちは こんにちは"
),
[
"こん"
,
"##ばんは"
,
"[UNK]"
,
"こんにちは"
])
@
slow
def
test_sequence_builders
(
self
):
tokenizer
=
self
.
tokenizer_class
.
from_pretrained
(
"bert-base-japanese"
)
...
...
@@ -141,6 +140,7 @@ class BertJapaneseTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
assert
encoded_pair
==
[
2
]
+
text
+
[
3
]
+
text_2
+
[
3
]
@
custom_tokenizers
class
BertJapaneseCharacterTokenizationTest
(
TokenizerTesterMixin
,
unittest
.
TestCase
):
tokenizer_class
=
BertJapaneseTokenizer
...
...
@@ -187,7 +187,6 @@ class BertJapaneseCharacterTokenizationTest(TokenizerTesterMixin, unittest.TestC
self
.
assertListEqual
(
tokenizer
.
tokenize
(
"こんにちほ"
),
[
"こ"
,
"ん"
,
"に"
,
"ち"
,
"[UNK]"
])
@
slow
def
test_sequence_builders
(
self
):
tokenizer
=
self
.
tokenizer_class
.
from_pretrained
(
"bert-base-japanese-char"
)
...
...
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