lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lavin <lav...@cs.tcd.ie>
Subject Cosine Similarity Using Two or More Terms`
Date Thu, 07 Mar 2013 14:30:45 GMT

Dear Users,

I'm calculation cosine similarity between two documents using code based 
on the code at this link...

http://sujitpal.blogspot.ch/2011/10/computing-document-similarity-using.html

Is it working fine, but I want to use terms from two different fields in 
my indexed documents.

Specifically, I need to know how to add the term.text to the 
<String,int> hashmap (around line 28 in the code on the page/link above).

Does anyone have a working code sample for doing this? Or perhaps 
outline what needs to happen to get both sets of terms into the hashmap?

any help appreciated,

regards
Peter


-- 
with best regards,
Peter Lavin,
PhD Candidate,
CAG - Computer Architecture & Grid Research Group,
Lloyd Institute, 005,
Trinity College Dublin, Ireland.
+353 1 8961536

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message