Hello Mario,
I had a similar problem a few weeks ago (thread "How to get Term Weights
(document term matrix)?", 20061102,
http://www.gossamerthreads.com/lists/lucene/javauser/41726).
I think there is no simple function creating a document term matrix or
accessing it. I extracted the matrix from my index and stored the matrix
in a database.
To create the matrix I iterated the terms and the documents for each term:
TermEnum terms=IndexReader.terms();
while(terms.next()) {
TermDocs docs=IndexReader.termDocs(terms.term());
while(docs.next()) {
//store the term, the document and the weight
//document frequency: indexreader.docFreq(term)
//term frequency: termdoc.freq()
}
}
SÃ¶ren
mariolone wrote:
> Hi!!!!
> I have a problem:
> i must create a matrix term for document in which every element of the
> matrix it represents the number of occurrences of that term in the document.
> How can I do?
> Can someone help me?
> Thanks to all....
>
> P.S. I must applicate LSA to this matrix.

To unsubscribe, email: javauserunsubscribe@lucene.apache.org
For additional commands, email: javauserhelp@lucene.apache.org
