【问题标题】:error in applying pre-trained model for english of maltparser对 maltparser 的英语应用预训练模型时出错
【发布时间】:2013-02-16 14:18:27
【问题描述】:

我正在着手 ma​​ltparser。我想申请提供的

预训练模型'engmalt.linear-1.7'进行解析

命令行上的

english句。

我下载了 engmalt 并将其文件名从

'engmalt.linear-1.7.zip' 到 'engmalt.linear-1.7.mco'。我

保存例句英语(在engmalt的下载页面上)

在“infile.conll”中并在命令行上运行。

我无法得到结果并且出现了一个奇怪的错误:

标签“FORM”没有可用的标签符号。

(顺便说一句,如果我测试 '/maltparser-

maltparser 的 1.7.1/examples/data/talbanken05_test.conll'

package,居然可以得到依赖! )

  • Q1:我应该更改“engmalt.linear”的文件扩展名吗?

  • Q2:为什么我可以使用 engmalt 来解析 'talbanken05_test.conll'(不是

英文句子)?

  • Q3:为什么解析英文句子会出错?是什么原因

是什么意思?

非常感谢!

【问题讨论】:

  • 您确定在从下载页面复制的句子中使用制表符分隔列吗?
  • 谢谢,这就是问题所在。 :)

标签: forms parsing nlp text-parsing


【解决方案1】:

这是一个老问题,我不确定 OP 是否仍需要答案。您应该与预训练模型一起使用的正确格式是此 xml 中定义的十列格式:

<?xml version="1.0" encoding="UTF-8"?>
<dataformat name="conllx">
    <column name="ID" category="INPUT" type="INTEGER"/>
    <column name="FORM" category="INPUT" type="STRING"/>
    <column name="LEMMA" category="INPUT" type="STRING"/>
    <column name="CPOSTAG" category="INPUT" type="STRING"/>
    <column name="POSTAG" category="INPUT" type="STRING"/>
    <column name="FEATS" category="INPUT" type="STRING"/>
    <column name="HEAD" category="HEAD" type="INTEGER"/>
    <column name="DEPREL" category="DEPENDENCY_EDGE_LABEL" type="STRING"/>
    <column name="PHEAD" category="IGNORE" type="INTEGER" default="_"/>
    <column name="PDEPREL" category="IGNORE" type="STRING" default="_"/>

</dataformat>

【讨论】:

    猜你喜欢
    • 2011-04-10
    • 1970-01-01
    • 1970-01-01
    • 2021-11-23
    • 1970-01-01
    • 2017-08-19
    • 2021-03-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多