
官网安装
1.
pip3 install amrlib
(在amrlib可以找到requirements.txt)
2.
pip install unidecode
3.
在models下载想要的model
4.
放到E:\Anaconda3\envs\py37\Lib\site-packages\amrlib\data\model_stog
5.测试:
import amrlib
stog = amrlib.load_stog_model()
graphs = stog.parse_sents(['This is a test of the system.', 'This is a second sentence.'])
for graph in graphs:
print(graph)
输出:
在这里插入代码片# ::snt This is a test of the system.
(t / test-01
:ARG1 (s / system)
:domain (t2 / this))
# ::snt This is a second sentence.
(s / sentence
:ord (o / ordinal-entity
:value 2)
:domain (t / this))
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)