File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 1515# See the License for the specific language governing permissions and
1616# limitations under the License.!
1717
18- import sys
19-
2018from collections import defaultdict
2119import io
2220import os
2321import pickle
24- import unittest
22+ import sys
2523import threading
24+ import unittest
2625import sentencepiece as spm
2726
2827HERE = os .path .dirname (os .path .abspath (__file__ ))
3130print ('VERSION={}' .format (spm .__version__ ))
3231
3332data_dir = HERE
34- if sys .platform == 'win32' :
35- data_dir = os .path .join ('..' , 'data' )
3633
3734
3835class TestSentencepieceProcessor (unittest .TestCase ):
@@ -42,9 +39,7 @@ def setUp(self):
4239 self .sp_ = spm .SentencePieceProcessor ()
4340 self .jasp_ = spm .SentencePieceProcessor ()
4441 self .assertTrue (self .sp_ .Load (os .path .join (HERE , 'test_model.model' )))
45- self .assertTrue (
46- self .jasp_ .Load (os .path .join (HERE , 'test_ja_model.model' ))
47- )
42+ self .assertTrue (self .jasp_ .Load (os .path .join (HERE , 'test_ja_model.model' )))
4843 with open (os .path .join (HERE , 'test_model.model' ), 'rb' ) as f :
4944 self .assertTrue (self .sp_ .LoadFromSerializedProto (f .read ()))
5045 with open (os .path .join (HERE , 'test_ja_model.model' ), 'rb' ) as f :
You can’t perform that action at this time.
0 commit comments