smile.nlp
Interface Corpus
-
- All Known Implementing Classes:
- SimpleCorpus
public interface CorpusA corpus is a collection of documents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intgetAverageDocumentSize()Returns the average size of documents in the corpus.intgetBigramFrequency(Bigram bigram)Returns the total frequency of the bigram in the corpus.java.util.Iterator<Bigram>getBigrams()Returns an iterator over the bigrams in the corpus.longgetNumBigrams()Returns the number of bigrams in the corpus.intgetNumDocuments()Returns the number of documents in the corpus.intgetNumTerms()Returns the number of unique terms in the corpus.intgetTermFrequency(java.lang.String term)Returns the total frequency of the term in the corpus.java.util.Iterator<java.lang.String>getTerms()Returns an iterator over the terms in the corpus.java.util.Iterator<Relevance>search(RelevanceRanker ranker, java.lang.String term)Returns an iterator over the set of documents containing the given term in descending order of relevance.java.util.Iterator<Relevance>search(RelevanceRanker ranker, java.lang.String[] terms)Returns an iterator over the set of documents containing (at least one of) the given terms in descending order of relevance.java.util.Iterator<Text>search(java.lang.String term)Returns an iterator over the set of documents containing the given term.longsize()Returns the number of words in the corpus.
-
-
-
Method Detail
-
size
long size()
Returns the number of words in the corpus.
-
getNumDocuments
int getNumDocuments()
Returns the number of documents in the corpus.
-
getNumTerms
int getNumTerms()
Returns the number of unique terms in the corpus.
-
getNumBigrams
long getNumBigrams()
Returns the number of bigrams in the corpus.
-
getAverageDocumentSize
int getAverageDocumentSize()
Returns the average size of documents in the corpus.
-
getTermFrequency
int getTermFrequency(java.lang.String term)
Returns the total frequency of the term in the corpus.
-
getBigramFrequency
int getBigramFrequency(Bigram bigram)
Returns the total frequency of the bigram in the corpus.
-
getTerms
java.util.Iterator<java.lang.String> getTerms()
Returns an iterator over the terms in the corpus.
-
getBigrams
java.util.Iterator<Bigram> getBigrams()
Returns an iterator over the bigrams in the corpus.
-
search
java.util.Iterator<Text> search(java.lang.String term)
Returns an iterator over the set of documents containing the given term.
-
search
java.util.Iterator<Relevance> search(RelevanceRanker ranker, java.lang.String term)
Returns an iterator over the set of documents containing the given term in descending order of relevance.
-
search
java.util.Iterator<Relevance> search(RelevanceRanker ranker, java.lang.String[] terms)
Returns an iterator over the set of documents containing (at least one of) the given terms in descending order of relevance.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG