public class MentionAnnotation extends Annotation
| Modifier and Type | Class and Description |
|---|---|
static class |
MentionAnnotation.Type |
Annotation.Match, Annotation.Source| Modifier and Type | Field and Description |
|---|---|
protected String |
refId
Referenced ID, e.g.
|
protected String |
type
Type of the annotation, e.g.
|
confidence, source, text| Modifier | Constructor and Description |
|---|---|
protected |
MentionAnnotation()
Deprecated.
only used for JSON deserialization.
|
|
MentionAnnotation(Annotation.Source source,
int begin,
int end,
String type,
List<Token> tokens)
Creates a Typed MentionAnnotation using manual Span offsets.
|
|
MentionAnnotation(Annotation.Source source,
List<Token> tokens)
Creates a GENERIC MentionAnnotation using Span offsets from given Tokens.
|
|
MentionAnnotation(Annotation.Source source,
List<Token> tokens,
double confidence)
Creates a GENERIC MentionAnnotation using Span offsets from given Tokens.
|
|
MentionAnnotation(Annotation.Source source,
String text,
int begin,
int end)
Creates a GENERIC MentionAnnotation using manual Text and Span offsets.
|
|
MentionAnnotation(Document doc,
Annotation.Source source,
List<Token> tokens,
String type,
double confidence)
Creates a GENERIC MentionAnnotation using Span offsets from given Tokens.
|
contains, getConfidence, getSource, getText, intersects, matches, matches, setConfidence, setSource, setTextclearTags, clearVectors, clearVectors, clearVectors, compareTo, getBegin, getDocumentRef, getDocumentRefUid, getEnd, getLength, getTag, getUid, getVector, getVector, getVector, getVectorKeys, hasVector, hasVector, putTag, putVector, putVector, setBegin, setDocumentRef, setEnd, setLength, setUidprotected String type
protected String refId
public MentionAnnotation(Annotation.Source source, int begin, int end, String type, List<Token> tokens)
public MentionAnnotation(Annotation.Source source, String text, int begin, int end)
public MentionAnnotation(Annotation.Source source, List<Token> tokens)
public MentionAnnotation(Annotation.Source source, List<Token> tokens, double confidence)
public MentionAnnotation(Document doc, Annotation.Source source, List<Token> tokens, String type, double confidence)
@Deprecated protected MentionAnnotation()
public String getType()
public void setType(String type)
type - public String getRefId()
public void setRefId(String id)
public int hashCode()
hashCode in class Annotationpublic boolean equals(Object obj)
equals in class Annotationpublic static MentionAnnotation createFromPositions(Annotation.Source source, Document doc, int begin, int end, String id, String type)
public static void annotateFromTags(Iterable<Document> docs, Annotation.Source source, Class<? extends Tag> tagset)
public static void annotateFromTags(Iterable<Document> docs, Annotation.Source source, Class<? extends Tag> tagset, String type)
public static void annotateFromTags(AbstractIterator it, Annotation.Source source, Class<? extends Tag> tagset)
public static void annotateFromTags(AbstractIterator it, Annotation.Source source, Class<? extends Tag> tagset, String type)
public static void annotateFromTags(Document doc, Annotation.Source source, Class<? extends Tag> tagset)
public static void annotateFromTags(Document doc, Annotation.Source source, Class<? extends Tag> tagset, String type)
public static void createTagsFromAnnotations(Document doc, Annotation.Source source, Class<? extends Tag> tagset)
Copyright © 2020. All rights reserved.