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_coreference_loader.py 546 B

12345678910111213141516
  1. from fastNLP.io.loader.coreference import CRLoader
  2. import unittest
  3. class TestCR(unittest.TestCase):
  4. def test_load(self):
  5. test_root = "test/data_for_tests/coreference/"
  6. train_path = test_root+"coreference_train.json"
  7. dev_path = test_root+"coreference_dev.json"
  8. test_path = test_root+"coreference_test.json"
  9. paths = {"train": train_path,"dev":dev_path,"test":test_path}
  10. bundle1 = CRLoader().load(paths)
  11. bundle2 = CRLoader().load(test_root)
  12. print(bundle1)
  13. print(bundle2)