concept term frequency vector in category machine learning
appears as: term frequency vector

This is an excerpt from Manning's book Collective Intelligence in Action.
Another alternative is to use an application package such as Solr (see section 11.4.2), which takes care of a lot of these issues. Having looked at how to incrementally update the index, next let’s look at how we can access the term frequency vector using Lucene.
You can access the term vectors associated with each of the fields using the IndexReader. Note that when creating the Field object as shown in listing 11.3, you need to set the third argument in the static method for creating a field to Field.TermVector.YES. Listing 11.10 shows some sample code for accessing the term frequency vector.
Listing 11.10. Sample code to access the term frequency vector for a field
public void illustrateTermFreqVector(Directory indexDirectory) throws Exception { IndexReader indexReader = IndexReader.open(indexDirectory); for (int i = 0; i < indexReader.numDocs(); i ++) { System.out.println("Blog " + i); TermFreqVector termFreqVector = indexReader.getTermFreqVector(i, "completeText"); String [] terms = termFreqVector.getTerms(); int [] freq = termFreqVector.getTermFrequencies(); for (int j =0 ; j < terms.length; j ++) { System.out.println(terms[j] + " " + freq[j]); } } }