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:
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"?