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

Hybrid Infobox & Mappings extractor #22

Closed
jimkont opened this Issue Mar 18, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@jimkont
Member

jimkont commented Mar 18, 2013

Create a combination of infobox & mapping extractor.
Infobox extracts very raw data that in many cases have errors but can be useful if no mapping exists for the extracted template.

The new extractor should extract this raw data only if a mapping does not exists

@aditya-nambiar

This comment has been minimized.

Show comment
Hide comment
@aditya-nambiar

aditya-nambiar Mar 24, 2016

Contributor

Hi, I would like to take up this task. Can you give a few examples of wikipedia pages which I could use .

Contributor

aditya-nambiar commented Mar 24, 2016

Hi, I would like to take up this task. Can you give a few examples of wikipedia pages which I could use .

@jimkont

This comment has been minimized.

Show comment
Hide comment
@jimkont

jimkont Mar 25, 2016

Member

You can try with articles that use the Infobox_Person template
https://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:Infobox_person?limit=500&namespace=0

e.g. in page http://dbpedia.org/page/Aristotle
we have dbo:* properties that come from the MappingsExtractor and dbp:* properties that come from the InfoboxExtractor
some of the triples extracted overlap, e.g. dbp:placeOfBirth vs dbo:deathPlace and the idea is to keep only the dbo in those cases

Member

jimkont commented Mar 25, 2016

You can try with articles that use the Infobox_Person template
https://en.wikipedia.org/wiki/Special:WhatLinksHere/Template:Infobox_person?limit=500&namespace=0

e.g. in page http://dbpedia.org/page/Aristotle
we have dbo:* properties that come from the MappingsExtractor and dbp:* properties that come from the InfoboxExtractor
some of the triples extracted overlap, e.g. dbp:placeOfBirth vs dbo:deathPlace and the idea is to keep only the dbo in those cases

@jimkont

This comment has been minimized.

Show comment
Hide comment
@jimkont

jimkont Mar 28, 2016

Member

A way to achieve this is to create a new meta extractor that runs both the MappingExtractor and the InfoboxExtractor and tries to remove the triples from the InfoboxExtractor that are mapped from the MappingExtractor.

In general this is not an easy task but we can use the Quad context to hack our way. In the context we store the line in wikitext a triple was extracted and in some other cases, other info as well.

Since we can have multiple properties of a template on the same line, the line alone cannot be used but, if we stored the template and the template property in the context too then we would have enough information to locate duplicate facts.

The workflow in the new meta extractor would be something like

  1. Extract the page with the MappingExtractor and get all quads
  2. For every quad we get, get the context q1=(line, template name, property name) and store it in a set Mapped
  3. Extract the page with the InfoboxExtractor and get all quads
  4. For every quad we get, we the context q2=(line, template name, property name) and accept the quad to the output only Mapped does not contain q2
Member

jimkont commented Mar 28, 2016

A way to achieve this is to create a new meta extractor that runs both the MappingExtractor and the InfoboxExtractor and tries to remove the triples from the InfoboxExtractor that are mapped from the MappingExtractor.

In general this is not an easy task but we can use the Quad context to hack our way. In the context we store the line in wikitext a triple was extracted and in some other cases, other info as well.

Since we can have multiple properties of a template on the same line, the line alone cannot be used but, if we stored the template and the template property in the context too then we would have enough information to locate duplicate facts.

The workflow in the new meta extractor would be something like

  1. Extract the page with the MappingExtractor and get all quads
  2. For every quad we get, get the context q1=(line, template name, property name) and store it in a set Mapped
  3. Extract the page with the InfoboxExtractor and get all quads
  4. For every quad we get, we the context q2=(line, template name, property name) and accept the quad to the output only Mapped does not contain q2

jimkont added a commit that referenced this issue Jun 1, 2016

jimkont added a commit that referenced this issue Jun 10, 2016

@jimkont jimkont closed this in 0dfdd5d Jun 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment