QData / TextAttack

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/
https://textattack.readthedocs.io/en/master/
MIT License
2.98k stars 397 forks source link

Use cache to achieve faster generation of Chinese HowNet replacement … #786

Closed liuyuyan2717 closed 7 months ago

liuyuyan2717 commented 8 months ago

…words

What does this PR do?

Summary

Optimize the search algorithm for HowNet replacement words to improve computational speed without changing the results.

old: 捕获

new: 捕获1

jxmorris12 commented 7 months ago

@liuyuyan2717 can you run the formatter?