public static void main(String[] args) {
HGConfiguration config = new HGConfiguration();
config.setTransactional(false);
String wordnetDB = "c:/hypergraphdb1";
HyperGraph graph = HGEnvironment.get(wordnetDB,config);
WNGraph wngraph = new WNGraph(graph);
HGHandle LoveLemma = wngraph.findWord("car");
HGHandle RomanceLemma = wngraph.findWord("emotion");
List<HGHandle> syn = wngraph.getNounSenses(LoveLemma);
List<HGHandle> syn2 = wngraph.getNounSenses(RomanceLemma);
for(int i = 0; i < syn.size(); i++) {
System.out.println(graph.get(syn.get(i)).toString());
}
}
I get this result
Noun(a conveyance for passengers or freight on a cable railway; "they took a cable car to the top of the mountain")
Noun(a wheeled vehicle adapted to the rails of railroad; "three cars had jumped the rails")
Noun(where passengers ride up and down; "the car was on the top floor")
Noun(a motor vehicle with four wheels; usually propelled by an internal combustion engine; "he needs a car to get to work")
Noun(the compartment that is suspended from an airship and that carries personnel and the cargo and the power plant)
I need to print the terms inside each synset????
Regards,
--
You received this message because you are subscribed to the Google Groups "HyperGraphDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypergraphdb...@googlegroups.com.
To post to this group, send email to hyperg...@googlegroups.com.
Visit this group at https://groups.google.com/group/hypergraphdb.
For more options, visit https://groups.google.com/d/optout.