test_extraction.py 445 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. import json
  3. from kwextraction.extraction import extractor
  4. def get_key_words(text_list):
  5. return extractor(text_list)
  6. if __name__ == '__main__':
  7. test_l = [
  8. '1#1-3号生活热水水泵的耗电功率是多少@=-',
  9. '1#1-3号生活热水水泵的出水温度d是多少@=-',
  10. ]
  11. for item in get_key_words(test_l):
  12. print(json.dumps(item, sort_keys=True, indent=4, ensure_ascii=False))