public class DocumentCollection extends java.util.HashSet<Document> implements java.util.Observer
Modifier and Type | Class and Description |
---|---|
static class |
DocumentCollection.WEIGHT |
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private java.util.TreeMap<java.lang.String,java.util.Set<Document>> |
terms |
Constructor and Description |
---|
DocumentCollection() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Document o) |
private void |
addTermOcc(Document doc,
java.lang.String term) |
void |
clear() |
java.lang.String[] |
getDimensions() |
double[] |
getDocVector(Document doc,
DocumentCollection.WEIGHT vectorType) |
java.util.Set<java.lang.String> |
getTerms()
return the set of terms
Be careful this method returns a reference to the set of terms and not a copy !!!
|
double[] |
getTFDocVector(Document doc) |
double[] |
getTFIDFDocVector(Document doc) |
private void |
indexTermsOf(Document doc) |
boolean |
remove(Document o) |
void |
update(java.util.Observable o,
java.lang.Object arg) |
clone, contains, isEmpty, iterator, remove, size, spliterator
addAll, containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
private static final long serialVersionUID
private java.util.TreeMap<java.lang.String,java.util.Set<Document>> terms
private void indexTermsOf(Document doc)
private void addTermOcc(Document doc, java.lang.String term)
public java.util.Set<java.lang.String> getTerms()
public java.lang.String[] getDimensions()
public double[] getTFIDFDocVector(Document doc)
public double[] getDocVector(Document doc, DocumentCollection.WEIGHT vectorType)
public double[] getTFDocVector(Document doc)
public boolean add(Document o)
public void clear()
public boolean remove(Document o)
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
(C) INRIA, Univ. Grenoble Alpes & friends, 2008-2017