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_classification.py 524 B

12345678910111213
  1. import unittest
  2. import os
  3. from fastNLP.io.pipe.classification import SSTPipe, SST2Pipe, IMDBPipe, YelpFullPipe, YelpPolarityPipe
  4. @unittest.skipIf('TRAVIS' in os.environ, "Skip in travis")
  5. class TestPipe(unittest.TestCase):
  6. def test_process_from_file(self):
  7. for pipe in [YelpPolarityPipe, SST2Pipe, IMDBPipe, YelpFullPipe, SSTPipe]:
  8. with self.subTest(pipe=pipe):
  9. print(pipe)
  10. data_bundle = pipe(tokenizer='raw').process_from_file()
  11. print(data_bundle)