0

I am new to wordnet API and I am struggling how I can get to th following issue;

I would like that if I give for example "George Bush" I will arrive to the term person. The following diagram illustrates better from the online API:

enter image description here

Through the following code i managed to output the first stage, which is:

[Bush,George Bush,George W. Bush,George Walker Bush,President Bush,President George W. Bush,Dubyuh,Dubya] - 43rd President of the United States; son of George Herbert Walker Bush (born in 1946)

The code:

 WordNetDatabase database = WordNetDatabase.getFileInstance();
        Synset[] synsets = database.getSynsets("George Bush", SynsetType.NOUN);
        for (int i = 0; i < synsets.length; i++) {
            System.out.println(synsets[i]);
}

Any idea how I can arrive to the term "person"?

IT_info
  • 717
  • 3
  • 15
  • 33

1 Answers1

0

Why don't you use DBpedia for this purpose?

It will serve your purpose better, as it has the infoboxes which are extracted from Wikipedia. Its also available free for use.

(P.S : If I understand correctly, your purpose is to get the superclass of an entity.)

voidMainReturn
  • 2,648
  • 3
  • 27
  • 53