1. OpenNRE
官方文档:https://opennre-docs.readthedocs.io/en/latest/user_guide/user.html
可以提取一个句子中,两个实体间的关系,但必须指定实体。(提供预训练模型)
例如:
He was the son of Máel Dúin mac Máele Fithrich, and grandson of the high king Áed Uaridnach
寻找Máel Dúin mac Máele Fithrich和Áed Uaridnach的关系:father
2. nlpaug
代码:https://github.com/makcedward/nlpaug
说明文档:https://towardsdatascience.com/data-augmentation-in-nlp-2801a34dfc28
知乎中文解读:https://zhuanlan.zhihu.com/p/141810485?utm_source=zhihu&utm_medium=social&utm_oi=542258371047370752
可以类似于图像增强,对文本进行增强(近义词替换、嵌入替换、反向翻译、误拼写、语法树操作)。
3. Transformers
官方文档:https://huggingface.co/transformers/master/quicktour.html
可以简单调用预训练模型,实现 情感分析、文本生成、命名实体识别、问答、填充mask文本、摘要提取、翻译、特征提取功能
4. DDParser
代码及说明:https://github.com/baidu/DDParser
是百度开源nlp项目,可实现中文句法分析的显式结构表示(但不可以应用在英文)
5. Stanford CoreNLP
官网:https://stanfordnlp.github.io/CoreNLP/index.html
python使用它:https://github.com/Lynten/stanford-corenlp
在线试用网页:https://corenlp.run/
是功能强大的NLP开源工具,最有特色的功能是句法依存分析和共指注释(支持很多语言)
- 句法依存:
其中依赖关系为斯坦福依赖,详细定义在https://downloads.cs.stanford.edu/nlp/software/dependencies_manual.pdf - 共指注释: