You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
-
-
- import unittest
- from ..data.CWSDataLoader import SigHanLoader
- from fastNLP.core.vocabulary import VocabularyOption
-
-
- class TestCWSDataLoader(unittest.TestCase):
- def test_case1(self):
- cws_loader = SigHanLoader(target_type='bmes')
- data = cws_loader.process('pku_demo.txt')
- print(data.datasets)
-
- def test_calse2(self):
- cws_loader = SigHanLoader(target_type='bmes')
- data = cws_loader.process('pku_demo.txt', bigram_vocab_opt=VocabularyOption())
- print(data.datasets)
|