amrlib 安装测试

amrlib 安装测试,第1张

官网安装
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))

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/919136.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-16
下一篇2022-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存