自然语言处理的python库
grammar的Python项目详细描述
语法
语法是自然语言处理的python库。
安装
您可以使用pip安装语法。
pip install grammar
依赖关系
语法使用Vineyard和Graphviz可视化文档的图形。
用法
创建文档
fromgrammarimportDocument# create documentdocument=Document("He also begat and brought up five pairs of male children.")
实体图
display(document.entity_graph.render())
文档图
display(document.graph.render())