带有nlpnet的SRL不适用于某些句子

2024-09-28 15:28:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我安装了nlpnet并下载了data。但它只适用于一些句子。我在virtualenv中使用ubuntu13.0432bits和python2.7.4。在

我在这里贴了两个例子,第一个似乎有用,第二个没有:

例1(似乎有效):

python nlpnet-tag.py srl /path/to/nlpnet-data/
This is the first sentence of the paragraph. This is the second sentence of the paragraph.
This is the first sentence of the paragraph .
sentence
    A1: the paragraph
    A0: first
    V: sentence

This is the second sentence of the paragraph .
sentence
    A1: the paragraph
    A0: second
    V: sentence

例2(无效):

这个句子取自CoNLL-2005 Examples

^{pr2}$

我还从python和tokenization进行了测试,但是在第二个调用arg_structures的示例中,返回一个空列表。在

我错过了什么。。。如果您能在不使用nlpnet的情况下提供解决方案,我们将不胜感激。在

谢谢

PS:我也reported this issue,但想看看有没有人帮我修一下。在


Tags: ofthedatavirtualenvisa1thisa0
1条回答
网友
1楼 · 发布于 2024-09-28 15:28:19

erickrf,包的作者,answer它:

the problem here is that the trained models from http://nilc.icmc.usp.br/nilc/download/nlpnet-data.zip were trained for Portuguese. It won't work in English.

When you get an empty arg_structures list, it means that the network didn't recognize any token as a predicate.

相关问题 更多 >