fr.inrialpes.exmo.ontosim.vector.model
Class Document
java.lang.Object
java.util.Observable
fr.inrialpes.exmo.ontosim.vector.model.Document
public class Document
- extends Observable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
private String name
cardDoc
private int cardDoc
termsOcc
private Map<String,Integer> termsOcc
Document
public Document(String name)
addOccTerm
public void addOccTerm(String term)
addOccTerms
public void addOccTerms(Collection<String> terms)
getCardinality
public int getCardinality()
getNbOcc
public int getNbOcc(String term)
- return the number of occurrences of the given term in the document
- Parameters:
term
- : a term
- Returns:
- the number of occurrences of given term if it apear in the document (0 if it does not appear)
getTerms
public String[] getTerms()
contains
public boolean contains(String term)
getTF
public double getTF(String term)
getName
public String getName()
(C) INRIA & friends, 2008-2009