lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishal Bathija" <>
Subject Calculating term and document frequency for multiple word terms
Date Mon, 10 Apr 2006 16:12:05 GMT
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 ="C:\\Documents and
Settings\\Owner\\My Documents\\Thesis\\luceneTest\\index");
Term t1 = new Term("contents","\"increases aesthetic\"");
TermDocs  tdTest2= rd.termDocs(t1);
while( )

		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
Phone: (513)-461-9239

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message