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

How can I find associated types of an entity ? #45

Open
mailong25 opened this issue Oct 15, 2018 · 1 comment
Open

How can I find associated types of an entity ? #45

mailong25 opened this issue Oct 15, 2018 · 1 comment

Comments

@mailong25
Copy link

mailong25 commented Oct 15, 2018

I want to extract the optimal entity from a list of candidates using Equation 6 from the paper:

image

But I don't how to find associated types of each candidate entity. Is there any easy way to get associated types from Wikipedia_anchor_text or Wikipedia_ID.

@JonathanRaiman
Copy link
Contributor

It's a two-step process:

  1. Use a lookup table in the TypeCollection class such as name2id (https://github.com/openai/deeptype/blob/master/extraction/classifiers/type_classifier.py#L17) to obtain a numerical id
  2. load the projections (type, time, location, etc.) using code such as this one
    def load_oracle_classification(path):
  3. The classify method
    def classify(self, index):
    of the projections gives you the associated types (e.g. type = load_oracle_classification("/path/to/classifcation").classify(wkd("Human")))

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