jlowenz / hypergraphdb

Automatically exported from code.google.com/p/hypergraphdb
0 stars 0 forks source link

unrelated results from Wordnet hyper graph in the retrieval time #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. travers wordnet hg for a specific term
2. get unrelated result from the traversing when comparing with online wordnet

What is the expected output? What do you see instead?
Ex: search for  word travel 
expected output: 
travel, traveling, travelling (the act of going from one place to another) "he 
enjoyed selling but he hated the travel"
change of location, travel (a movement through space that changes the location 
of something)
locomotion, travel (self-propelled movement) 
========================================
instead output:

Visiting atom move_around pointed to by Verb(travel from place to place, as for 
the purpose of finding work, preaching, or acting as a judge)
Visiting atom turn pointed to by Verb(pass to the other side of; "turn the 
corner"; "move around the obstacle")
Visiting atom plough pointed to by Verb(to break and turn over earth especially 
with a plow; "Farmer Jones plowed his east field last week"; "turn the earth in 
the Spring")
Visiting atom plow pointed to by Verb(to break and turn over earth especially 
with a plow; "Farmer Jones plowed his east field last week"; "turn the earth in 
the Spring")
Visiting atom address pointed to by Verb(deal with verbally or in some form of 
artistic expression; "This book deals with incest"; "The course covered all of 
Western Civilization"; "The new book treats the history of China")
Visiting atom speak pointed to by Verb(give a speech to; "The chairman 
addressed the board of trustees")
Visiting atom verbalise pointed to by Verb(express in speech; "She talks a lot 
of nonsense"; "This depressed patient does not verbalize")
Visiting atom give_tongue_to pointed to by Verb(articulate; either verbally or 
with a cry, shout, or noise; "She expressed her anger"; "He uttered a curse")
Visiting atom express pointed to by Verb(articulate; either verbally or with a 
cry, shout, or noise; "She expressed her anger"; "He uttered a curse")
Visiting atom convey pointed to by Verb(serve as a means for expressing 
something; "The painting of Mary carries motherly love"; "His voice carried a 
lot af anger")
Visiting atom channel pointed to by Verb(transmit or serve as the medium for 
transmission; "Sound carries well over water"; "The airwaves carry the sound"; 
"Many metals conduct heat")
Visiting atom  groove pointed to by Noun(a long narrow furrow cut either by a 
natural process (such as erosion) or by a tool (as e.g. a groove in a 
phonograph record))
Visiting atom furrow pointed to by Verb(hollow out in the form of a furrow or 
groove; "furrow soil")

And it not stopping!! 
============================
What version of the product are you using? On what operating system?
the latest version on Mac OS

Please provide any additional information below.

here is a pice of code of the traversal

HGHandle word1 = wng.findWord(travel);
  HGDepthFirstTraversal traversal = 
                          new HGDepthFirstTraversal(word1, new SimpleALGenerator(graph));

            while (traversal.hasNext() ) {

                          Pair<HGHandle, HGHandle> current = traversal.next();

                           SynsetLink l = (SynsetLink )graph.get((HGHandle) current.getFirst());

                         Word atom = graph.get((HGHandle) current.getSecond());

                 System.out.println("Visiting atom  " + atom +   " pointed to by " + l);

Original issue reported on code.google.com by copy4e...@gmail.com on 10 Dec 2012 at 4:19

GoogleCodeExporter commented 9 years ago
Your code is traversing every thing related to the word "travel" in any 
possible way. It is not stopping because that could very well entail traversing 
the entire wordnet! What is it that you want to get as a result exactly? 
Perhaps you should take a look at the options in the DefaultALGenerator and 
constrain the types of links allowed in the traversal and perhaps set a limit 
on the depth? Otherwise it's getting every synonym of "travel", and every 
possible sense of every synonym and every word in that sense and all their 
synonyms etc....basically going through all of English :) 

Original comment by borislav...@gmail.com on 11 Dec 2012 at 6:56

GoogleCodeExporter commented 9 years ago
btw, when I run your code, it did finish after having traversed about 300k 
atoms.

Original comment by borislav...@gmail.com on 11 Dec 2012 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by borislav...@gmail.com on 31 Dec 2012 at 6:11