public class Document extends Object implements Comparable<Document>
Document class represents a single document within a corpus of documents. A set of documents can be
either used to train a new model or a document can be processed and annotated by an already trained model.
The Document class contains the actual text, a set of initial annotations, the option lattice containing
all the possible interpretations of this document, a set of option conflicts and a ranked list of weighted options.| Modifier and Type | Class and Description |
|---|---|
static class |
Document.ActivationKey |
static class |
Document.Annotation |
| Modifier and Type | Field and Description |
|---|---|
Option |
bottom |
NavigableMap<Document.ActivationKey,Activation> |
inputActivations |
int |
optionIdCounter |
int |
primOptionIdCounter |
ExpandNode |
selectedExpandNode |
Option |
selectedOption |
Option |
top |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(int begin,
int end,
String label,
int level) |
void |
addInputActivation(Activation act) |
int |
compareTo(Document d) |
String |
conflictsToString() |
static Document |
createDocument(String id,
String content) |
boolean |
equals(Object o) |
void |
finalizeDocument() |
List<Document.Annotation> |
getAnnotations() |
Set<Document.Annotation> |
getAnnotations(int pos) |
String |
getContent() |
String |
getId() |
Collection<Activation> |
getInputActivations(int pos) |
int |
hashCode() |
int |
length() |
void |
removeInputActivation(Activation act) |
String |
selectedOptionsToString() |
void |
setContent(String content) |
String |
toString() |
public NavigableMap<Document.ActivationKey,Activation> inputActivations
public int primOptionIdCounter
public int optionIdCounter
public Option top
public Option bottom
public ExpandNode selectedExpandNode
public Option selectedOption
public Document(String id)
public String getId()
public void setContent(String content)
public String getContent()
public int length()
public void addAnnotation(int begin,
int end,
String label,
int level)
public List<Document.Annotation> getAnnotations()
public Set<Document.Annotation> getAnnotations(int pos)
public void addInputActivation(Activation act)
public void removeInputActivation(Activation act)
public Collection<Activation> getInputActivations(int pos)
public String conflictsToString()
public String selectedOptionsToString()
public void finalizeDocument()
public int compareTo(Document d)
compareTo in interface Comparable<Document>Copyright © 2016. All rights reserved.