lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishal Bathija" <vishalbath...@gmail.com>
Subject Calculating term and document frequency for multiple word terms
Date Mon, 10 Apr 2006 16:12:05 GMT
Hi,
I was wondering how I can get the document frequency and term
frequency of a phrase in a corpus. I am currently  using


IndexReader rd = IndexReader.open("C:\\Documents and
Settings\\Owner\\My Documents\\Thesis\\luceneTest\\index");
Term t1 = new Term("contents","\"increases aesthetic\"");
TermDocs  tdTest2= rd.termDocs(t1);
while(tdTest2.next() )
		{

		System.out.println(tdTest2.freq()  ) ;		
		}	
		



This seems to work for a single word term such as "increases", but not
for multiple word terms such as "increases aesthetic".

Any suggestions would be greatly appreciated.


Kind Regards
Vishal Bathija
		
		

--
Vishal Bathija
Graduate Student
Department of Computer Science & Systems Analysis
Miami University
Oxford,Ohio
Phone: (513)-461-9239

---------------------------------------------------------------------
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