com.sun.labs.minion.retrieval
Class MultiDocumentVectorImpl

java.lang.Object
  extended by com.sun.labs.minion.retrieval.DocumentVectorImpl
      extended by com.sun.labs.minion.retrieval.MultiDocumentVectorImpl
All Implemented Interfaces:
DocumentVector, java.io.Serializable, java.lang.Cloneable

public class MultiDocumentVectorImpl
extends DocumentVectorImpl
implements DocumentVector

An implementation of a document vector that combines the vectors for a number of documents into a single document.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.labs.minion.retrieval.DocumentVectorImpl
e, field, fieldID, fields, ignoreWords, key, keyName, length, logTag, normalized, qs, v, wc, wf
 
Constructor Summary
MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs)
           
MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs, SearchEngine e, java.lang.String field)
           
MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs, java.lang.String field)
           
MultiDocumentVectorImpl(SearchEngine e, java.util.List<DocKeyEntry> keys, java.lang.String field)
          Creates a document vector for a set of documents.
MultiDocumentVectorImpl(SearchEngine e, java.util.List<DocKeyEntry> keys, java.lang.String field, WeightingFunction wf, WeightingComponents wc)
          Creates a document vector for a set of documents.
 
Method Summary
 java.lang.String getKey()
          Gets the key for the document associated with this vector.
 
Methods inherited from class com.sun.labs.minion.retrieval.DocumentVectorImpl
copy, dot, dot, equals, findSimilar, findSimilar, findSimilar, getEngine, getEntry, getFeatures, getSet, getSimilarity, getSimilarity, getSimilarityTerms, getSimilarityTerms, getTerms, getTopWeightedTerms, getWeightOrderedSet, length, normalize, setEngine, setField, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.labs.minion.DocumentVector
copy, equals, findSimilar, findSimilar, findSimilar, getSimilarity, getSimilarityTerms, getTerms, getTopWeightedTerms, setEngine
 

Constructor Detail

MultiDocumentVectorImpl

public MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs)

MultiDocumentVectorImpl

public MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs,
                               java.lang.String field)

MultiDocumentVectorImpl

public MultiDocumentVectorImpl(java.util.List<DocumentVector> dvs,
                               SearchEngine e,
                               java.lang.String field)

MultiDocumentVectorImpl

public MultiDocumentVectorImpl(SearchEngine e,
                               java.util.List<DocKeyEntry> keys,
                               java.lang.String field)
Creates a document vector for a set of documents. The resulting document vector is the centroid of the vectors fro the individual documnts.

Parameters:
e - The search engine with which the documents are associated.
keys - The entries from the document dictionary for the documents to be combined
field - The name of the field for which we want the document vector. If this value is null a vector for the whole document will be returned. If this value is the empty string, then a vector for the text not in any defined field will be returned. If the named field is not a field that was indexed with the vectored attribute set, the resulting document vector will be empty!

MultiDocumentVectorImpl

public MultiDocumentVectorImpl(SearchEngine e,
                               java.util.List<DocKeyEntry> keys,
                               java.lang.String field,
                               WeightingFunction wf,
                               WeightingComponents wc)
Creates a document vector for a set of documents. The resulting document vector is the centroid of the vectors fro the individual documnts.

Parameters:
e - The search engine with which the documents are associated.
keys - The entries from the document dictionary for the documents to be combined
field - The name of the field for which we want the document vector. If this value is null a vector for the whole document will be returned. If this value is the empty string, then a vector for the text not in any defined field will be returned. If the named field is not a field that was indexed with the vectored attribute set, the resulting document vector will be empty!
wf - the weighting function to use instead of the default
wc - weight components to use instead of the default
Method Detail

getKey

public java.lang.String getKey()
Description copied from interface: DocumentVector
Gets the key for the document associated with this vector.

Specified by:
getKey in interface DocumentVector
Overrides:
getKey in class DocumentVectorImpl
Returns:
the key for this document.