modnlp.tc.dstruct
public class ParsedCorpus extends java.util.Vector
ParsedDocument
s.ParsedDocument
,
Serialized FormConstructor and Description |
---|
ParsedCorpus() |
Modifier and Type | Method and Description |
---|---|
boolean |
addNewsItem(ParsedDocument pni)
Deprecated.
This method was used (and named) in the original
REUTERS news classification system. Use addParsedDocument
instead.
|
boolean |
addParsedDocument(ParsedDocument pni)
Add a new categorised text to this corpus
|
void |
append(ParsedCorpus pt)
Concatenate
pt to this object. |
double |
getCategProbability(java.lang.String cat)
Get the overall probability of category cat classifying a
document in the corpus represented by this ParsedCorpus
(i.e.
|
ParsedCorpus |
getCategSubCorpus(java.lang.String cat)
Get the sub-corpus defined by documents belonging to category cat
|
Probabilities |
getProbabilities(java.lang.String term,
java.lang.String cat)
Get the joint probability of term 'term' occurring in a document
and category 'cat' classifying it.
|
java.lang.String |
toString() |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
public boolean addNewsItem(ParsedDocument pni)
pni
- a ParsedDocument
containing a
categorised, uniquely indentified text.public boolean addParsedDocument(ParsedDocument pni)
pni
- a ParsedDocument
containing a
categorised, uniquely indentified text.public void append(ParsedCorpus pt)
pt
to this object.pt
- a ParsedCorpus
containing categorised texts
to be appended to this object.public ParsedCorpus getCategSubCorpus(java.lang.String cat)
public double getCategProbability(java.lang.String cat)
public Probabilities getProbabilities(java.lang.String term, java.lang.String cat)
public java.lang.String toString()
toString
in class java.util.Vector