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

Path between entities #15

Open
orenpapers opened this issue Nov 6, 2017 · 3 comments
Open

Path between entities #15

orenpapers opened this issue Nov 6, 2017 · 3 comments

Comments

@orenpapers
Copy link

Hello,
Is it possible to get hiererchical path distance between entities?

For example,
Madrid -> Cities in spain -> Barcelon (distance = 1)
Madria -> Cities in spain -> Cities in europe -> Rome (distance = 2)

Thanks

@orenpapers orenpapers changed the title Hath between entities Path between entities Nov 6, 2017
@hopple
Copy link
Member

hopple commented Nov 8, 2017

Yes, for such taxonomical relation, you need to use Sematch to load Wikipedia category taxonomy.

@orenpapers
Copy link
Author

Do you mean like here in DBpedia Entity Similarity / DBpedia Concept Similarity?
http://gsi-upm.github.io/sematch/similarity/
I tried it but I have some problems:

  1. How can I see the path for a given entity/concept?
  2. What is the difference between entity and concept?
  3. How can I get the entity of a given word? for concept I can use: concept.name2concept(), but there is no such a function for entity.name2entitiy()?

Thanks!

@hopple
Copy link
Member

hopple commented Nov 18, 2017

In sematch/semantic/sparql.py you can find a class called NameSPARQL, there you can find name2entities, which is simply implemented based on exact string matching to entity names.

Regarding to your question 1, what I mean is you need to load the corresponding Wikipedia category taxonomy in DBpedia, which you need to download from DBpedia dataset. Then you can use sematch/semantic/graph.py to load the taxonomy data, and then use similarity interface.

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