in reply to Re: Hash table manipulation
in thread Hash table manipulation
In my program what i will do is, i will take google's top 10 results for a query and i will take the snippet's or title's from each result and compute the similarity between this returned snippet and the original query..
The computed similarity value is what i stored in the hash as key and the url's will be straightaway stored as hash value..
Now i want to filter it by some threshold like keys higher then 0.4 or something..for e.g $url={will contain the 10 url's grepped from xml result file} $value=sim();#will contain the similarity computed for all the ten res +ults; %hash; sim{ #here i compute similarity between query title and resulted snippet.. return $val;#i will return similarity value for each result } $hash{$value}=$url;#storing key & value in hash #i will sort the keys in hash in descending order to get the highest v +alue in top and print the url associated with that as a ouput..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hash table manipulation
by GrandFather (Saint) on Jul 12, 2011 at 11:31 UTC | |
by sarvan (Sexton) on Jul 13, 2011 at 04:23 UTC | |
by GrandFather (Saint) on Jul 13, 2011 at 06:49 UTC |