pr
用Rust编写的快速,资源少的自然语言处理和错误纠正库。 nlprule使用资源为NLP实现了基于规则和查找的方法。
from nlprule import Tokenizer , Rules
tokenizer = Tokenizer . load ( "en" )
rules = Rules . load ( "en" , tokenizer )
rules . correct ( "He wants that you send him an email." )
# returns: 'He wants you to send him an email.'
rules . correct ( "I can due his homework." )
# returns: 'I can do his homework.'
for s in rules . suggest ( "S