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.

test_cws.py 482 B

12345678910111213
  1. import unittest
  2. import os
  3. from fastNLP.io.pipe.cws import CWSPipe
  4. class CWSPipeTest(unittest.TestCase):
  5. @unittest.skipIf('TRAVIS' in os.environ, "Skip in travis")
  6. def test_process_from_file(self):
  7. dataset_names = ['pku', 'cityu', 'as', 'msra']
  8. for dataset_name in dataset_names:
  9. with self.subTest(dataset_name=dataset_name):
  10. data_bundle = CWSPipe(dataset_name=dataset_name).process_from_file()
  11. print(data_bundle)