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

搜索关系时当实体是object怎么搜索出来? #15

Closed
1234560o opened this issue Dec 6, 2019 · 5 comments
Closed

搜索关系时当实体是object怎么搜索出来? #15

1234560o opened this issue Dec 6, 2019 · 5 comments

Comments

@1234560o
Copy link

1234560o commented Dec 6, 2019

作者,您好,在kb.py代码中GetRelations_2hop函数在搜索2跳内的所有关系的时候,也包括其它都是把实体当作subject来进行搜索("match (a:Entity)-[r1:Relation]-()-[r2:Relation]->() where a.name=$name return DISTINCT r1.name,r2.name"),如果question中的gold_entity是object,这样不是就不能搜索出来呢?比如下面这个例子:
q43:谁废除了分封制?
select ?x where { ?x <主要成就> "废除 分封制". }
<秦始皇_(中国首位皇帝)>

@duterscmy
Copy link
Owner

duterscmy commented Dec 6, 2019 via email

@1234560o
Copy link
Author

1234560o commented Dec 6, 2019

哦,谢谢。我猜测,这类sql语句->表示单向,-是双向吧?

@duterscmy
Copy link
Owner

duterscmy commented Dec 6, 2019 via email

@1234560o
Copy link
Author

1234560o commented Dec 9, 2019

我看到这个例子:
q2265:"双城论"的提出者的作品有哪些?
SELECT ?x WHERE { <双城论> <提出者> ?y . ?x <作者> ?y . }
如果二跳只考虑单向,像这种是不是就搜索不到呢?

@duterscmy
Copy link
Owner

duterscmy commented Dec 11, 2019 via email

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

2 participants