Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文指代消解没有输出 #41

Closed
chenjiaxiang opened this issue May 19, 2018 · 10 comments
Closed

中文指代消解没有输出 #41

chenjiaxiang opened this issue May 19, 2018 · 10 comments

Comments

@chenjiaxiang
Copy link

我在general api里添加dcoref的时候,没有输出结果
3
2

但是pipeline中去掉dcoref,就会有正确的输出,英文部分并不存在这个问题,我在源码中看到中文和英文的处理代码除了model文件之外几乎没有区别,请问是这个wrapper现在还不支持中文的指代消解吗?

下面的代码是没有问题的测试代码

1

@zh215021
Copy link

您好,请问您解决这个问题了么?

@iamlxb3
Copy link

iamlxb3 commented Mar 20, 2019

我直接使用nlp.coref()报错:JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@MingxuanLiu
Copy link

您好,请问您的这个问题解决了吗?

@chenjiaxiang
Copy link
Author

您好,请问您的这个问题解决了吗?

我的这个问题解决了,但是应该是与代码相关的。不知道你代码怎么写的

@MingxuanLiu
Copy link

您好,请问您的这个问题解决了吗?

我的这个问题解决了,但是应该是与代码相关的。不知道你代码怎么写的

from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('/data/lmx/corenlp/stanford-corenlp-full-2018-10-05', lang='zh')
sentence = '孙某你好,我是赖某。请打开下面这个链接,领取会员奖励。'
output = nlp.annotate(text, properties={
'annotators': 'tokenize,dcoref,relation',
'outputFormat': 'json'
})
print(output)
您好,我是这样写的。

@chenjiaxiang
Copy link
Author

您好,请问您的这个问题解决了吗?

我的这个问题解决了,但是应该是与代码相关的。不知道你代码怎么写的

from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('/data/lmx/corenlp/stanford-corenlp-full-2018-10-05', lang='zh')
sentence = '孙某你好,我是赖某。请打开下面这个链接,领取会员奖励。'
output = nlp.annotate(text, properties={
'annotators': 'tokenize,dcoref,relation',
'outputFormat': 'json'
})
print(output)
您好,我是这样写的。

处理方式是pieline形式,annotator中应该包含更多的处理方式,具体你可以看下官方文档,其中有讲。

@MingxuanLiu
Copy link

您好,请问您的这个问题解决了吗?

我的这个问题解决了,但是应该是与代码相关的。不知道你代码怎么写的

from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('/data/lmx/corenlp/stanford-corenlp-full-2018-10-05', lang='zh')
sentence = '孙某你好,我是赖某。请打开下面这个链接,领取会员奖励。'
output = nlp.annotate(text, properties={
'annotators': 'tokenize,dcoref,relation',
'outputFormat': 'json'
})
print(output)
您好,我是这样写的。

处理方式是pieline形式,annotator中应该包含更多的处理方式,具体你可以看下官方文档,其中有讲。

我按照官方文档把annotator改成了这样'annotators': 'tokenize, ssplit, pos, lemma, ner, parse, coref',还是不行,可以问下您的代码是怎么写的吗?而且这样写了以后都不进行分词了。

@chenjiaxiang
Copy link
Author

chenjiaxiang commented Nov 21, 2019 via email

@xiayulehuan
Copy link

你好可以给我发一份吗? 我也在做中文指代消解。谢谢

@xiayulehuan
Copy link

你好,你收到文件了吗,可以给我发一份吗?997028703@qq.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants