Package | Description |
---|---|
gate | |
gate.annotation | |
gate.corpora | |
gate.creole | |
gate.event | |
gate.gui.annedit | |
gate.gui.docview | |
gate.util |
Modifier and Type | Method and Description |
---|---|
Annotation |
SimpleAnnotationSet.get(Integer id)
Find annotations by id
|
static Annotation |
Utils.getOnlyAnn(AnnotationSet annset)
Returns the only annotation that annset is expected to contains, throws an
exception if there is not exactly one annotation.
|
Modifier and Type | Method and Description |
---|---|
List<Annotation> |
AnnotationSet.inDocumentOrder()
Return a list of annotations sorted by increasing start offset, i.e.
|
static List<Annotation> |
Utils.inDocumentOrder(AnnotationSet as)
Return a List containing the annotations in the given annotation set, in
document order (i.e.
|
Iterator<Annotation> |
SimpleAnnotationSet.iterator()
Get an iterator for this set
|
Modifier and Type | Method and Description |
---|---|
boolean |
SimpleAnnotationSet.add(Annotation a)
Add an existing annotation, which should be an annotation on this
set's document.
|
static Integer |
Utils.addAnn(AnnotationSet outSet,
Annotation spanAnn,
String type,
FeatureMap fm)
Add a new annotation to the output annotation set outSet, covering the same
region as the annotation spanAnn, and having the given type and feature map.
|
boolean |
Annotation.coextensive(Annotation anAnnot)
Two Annotation are coestensive if their offsets are the same.
|
static AnnotationSet |
Utils.getCoextensiveAnnotations(AnnotationSet source,
Annotation coextAnn)
Get all the annotations from the source annotation set that start and end
at exactly the same offsets as the given annotation.
|
static AnnotationSet |
Utils.getCoextensiveAnnotations(AnnotationSet source,
Annotation coextAnn,
String type)
Get all the annotations from the source annotation set that start and end
at exactly the same offsets as the given annotation and have the specified type.
|
static AnnotationSet |
Utils.getContainedAnnotations(AnnotationSet sourceAnnotationSet,
Annotation containingAnnotation)
Get all the annotations from the source annotation set that lie within
the range of the containing annotation.
|
static AnnotationSet |
Utils.getContainedAnnotations(AnnotationSet sourceAnnotationSet,
Annotation containingAnnotation,
String targetType)
Get all the annotations of type targetType
from the source annotation set that lie within
the range of the containing annotation.
|
static AnnotationSet |
Utils.getCoveringAnnotations(AnnotationSet sourceAnnotationSet,
Annotation coveredAnnotation)
Get all the annotations from the source annotation set that cover
the range of the specified annotation.
|
static AnnotationSet |
Utils.getCoveringAnnotations(AnnotationSet sourceAnnotationSet,
Annotation coveredAnnotation,
String targetType)
Get all the annotations of type targetType
from the source annotation set that cover
the range of the specified annotation.
|
static AnnotationSet |
Utils.getOverlappingAnnotations(AnnotationSet sourceAnnotationSet,
Annotation overlappedAnnotation)
Get all the annotations from the source annotation set that
partly or totally overlap
the range of the specified annotation.
|
static AnnotationSet |
Utils.getOverlappingAnnotations(AnnotationSet sourceAnnotationSet,
Annotation overlappedAnnotation,
String targetType)
Get all the annotations of type targetType
from the source annotation set that partly or totally overlap
the range of the specified annotation.
|
static AnnotationSet |
Utils.intersect(AnnotationSet origSet,
Annotation... others)
Return the subset from the original set that matches one of the given annotations.
|
boolean |
Annotation.isCompatible(Annotation anAnnot)
This verifies if this annotation is compatible with another one.
|
boolean |
Annotation.isCompatible(Annotation anAnnot,
Set<? extends Object> aFeatureNamesSet)
This verifies if this annotation is compatible with another one,
given a set with certain keys.
|
boolean |
Annotation.isPartiallyCompatible(Annotation anAnnot)
This method verifies if two annotation and are partially compatible.
|
boolean |
Annotation.isPartiallyCompatible(Annotation anAnnot,
Set<? extends Object> aFeatureNamesSet)
This method verifies if two annotation and are partially compatible,
given a set with certain keys.
|
static AnnotationSet |
Utils.minus(AnnotationSet origSet,
Annotation... except)
Return the given set with the given annotations removed.
|
boolean |
Annotation.overlaps(Annotation aAnnot)
This method determines if this overlaps aAnnot, i.e.
|
static AnnotationSet |
Utils.plus(AnnotationSet origSet,
Annotation... toAdd)
Return the given set with the given annotations added.
|
boolean |
Annotation.withinSpanOf(Annotation aAnnot)
This method tells if this annotation's text range is
fully contained within the text annotated by
aAnnot 's
annotation. |
Modifier and Type | Method and Description |
---|---|
static AnnotationSet |
Factory.createImmutableAnnotationSet(Document document,
Collection<Annotation> annotations)
Utility method to create an immutable annotation set.
|
static AnnotationSet |
Utils.intersect(AnnotationSet origSet,
Collection<Annotation> others) |
static AnnotationSet |
Utils.minus(AnnotationSet origSet,
Collection<Annotation> exceptions)
Return the given set with the given annotations removed.
|
static AnnotationSet |
Utils.plus(AnnotationSet origSet,
Collection<Annotation> toAdd)
Return the given set with the given annotations added.
|
String |
Document.toXml(Set<Annotation> aSourceAnnotationSet)
Equivalent to toXml(aSourceAnnotationSet, true).
|
String |
Document.toXml(Set<Annotation> aSourceAnnotationSet,
boolean includeFeatures)
Returns an XML document aming to preserve the original markups(
the original markup will be in the same place and format as it was
before processing the document) and include (if possible)
the annotations specified in the aSourceAnnotationSet.
|
Modifier and Type | Class and Description |
---|---|
class |
AnnotationImpl
Provides an implementation for the interface gate.Annotation
|
Modifier and Type | Field and Description |
---|---|
protected HashMap<Integer,Annotation> |
AnnotationSetImpl.annotsById
Maps annotation ids (Integers) to Annotations
|
Modifier and Type | Method and Description |
---|---|
Annotation |
AnnotationFactory.createAnnotationInSet(AnnotationSet set,
Integer id,
Node start,
Node end,
String type,
FeatureMap features)
Adds a new AnnotationImpl to the given set.
|
Annotation |
DefaultAnnotationFactory.createAnnotationInSet(AnnotationSet set,
Integer id,
Node start,
Node end,
String type,
FeatureMap features) |
Annotation |
AnnotationSetImpl.get(Integer id)
Find annotations by id
|
Annotation |
CorpusAnnotationDiff.DiffSetElement.getLeftAnnotation()
Gets the left annotation
|
Annotation |
CorpusAnnotationDiff.DiffSetElement.getRightAnnotation()
Gets the right annotation
|
Modifier and Type | Method and Description |
---|---|
Set<Annotation> |
CorpusAnnotationDiff.getAnnotationsOfType(int annotType)
Returns a set with all annotations of a specific type
|
List<Annotation> |
AnnotationSetImpl.inDocumentOrder()
Return a list of annotations sorted by increasing start offset, i.e.
|
Iterator<Annotation> |
AnnotationSetImpl.iterator()
Get an iterator for this set
|
Modifier and Type | Method and Description |
---|---|
boolean |
ImmutableAnnotationSetImpl.add(Annotation a) |
boolean |
AnnotationSetImpl.add(Annotation a)
Add an existing annotation.
|
boolean |
AnnotationImpl.coextensive(Annotation anAnnot)
Two Annotation are coextensive if their offsets are the
same.
|
boolean |
AnnotationImpl.isCompatible(Annotation anAnnot)
This verifies if this annotation is compatible with another one.
|
boolean |
AnnotationImpl.isCompatible(Annotation anAnnot,
Set<? extends Object> aFeatureNamesSet)
This verifies if this annotation is compatible with another one,
given a set with certain keys.
|
boolean |
AnnotationImpl.isPartiallyCompatible(Annotation anAnnot)
This method verifies if two annotation and are partially compatible.
|
boolean |
AnnotationImpl.isPartiallyCompatible(Annotation anAnnot,
Set<? extends Object> aFeatureNamesSet)
This method verifies if two annotation and are partially compatible,
given a set with certain keys.
|
boolean |
AnnotationImpl.overlaps(Annotation aAnnot) |
protected boolean |
AnnotationSetImpl.removeFromIdIndex(Annotation a)
Remove from the ID index.
|
protected void |
AnnotationSetImpl.removeFromOffsetIndex(Annotation a)
Remove from the offset indices.
|
protected void |
AnnotationSetImpl.removeFromTypeIndex(Annotation a)
Remove from the type index.
|
void |
CorpusAnnotationDiff.DiffSetElement.setLeftAnnotation(Annotation aLeftAnnotation)
Sets the left annotation
|
void |
CorpusAnnotationDiff.DiffSetElement.setRightAnnotation(Annotation aRightAnnotation)
Sets the right annotation
|
boolean |
AnnotationImpl.withinSpanOf(Annotation aAnnot)
This method tells if this annotation's text range is
fully contained within the text annotated by
aAnnot 's
annotation. |
Modifier and Type | Method and Description |
---|---|
boolean |
ImmutableAnnotationSetImpl.addAll(Collection<? extends Annotation> arg0) |
boolean |
AnnotationSetImpl.addAll(Collection<? extends Annotation> c)
Adds multiple annotations to this set in one go.
|
protected boolean |
AnnotationSetImpl.addAllKeepIDs(Collection<? extends Annotation> c)
Adds multiple annotations to this set in one go.
|
protected void |
CorpusAnnotationDiff.doDiff(List<Annotation> aKeyAnnotList,
List<Annotation> aResponseAnnotList)
This method is the brain of the AnnotationSet diff and creates a set with
diffSetElement objects.
|
protected void |
CorpusAnnotationDiff.doDiff(List<Annotation> aKeyAnnotList,
List<Annotation> aResponseAnnotList)
This method is the brain of the AnnotationSet diff and creates a set with
diffSetElement objects.
|
Constructor and Description |
---|
DiffSetElement(Annotation aLeftAnnotation,
Annotation aRightAnnotation,
int aLeftType,
int aRightType)
Constructor for DiffSetlement
|
DiffSetElement(Annotation aLeftAnnotation,
Annotation aRightAnnotation,
int aLeftType,
int aRightType,
Document kDocument,
Document rDocument)
Constructor for DiffSetlement with document name
|
Constructor and Description |
---|
ImmutableAnnotationSetImpl(Document doc,
Collection<Annotation> annotations)
Constructs an ImmutableAnnotationSet.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<Annotation> |
DocumentStaxUtils.LONGEST_FIRST_OFFSET_COMPARATOR
Comparator that compares annotations based on their offsets; when
two annotations start at the same location, the longer one is
considered to come first in the ordering.
|
Modifier and Type | Method and Description |
---|---|
static String |
DocumentJsonUtils.toJson(Document doc,
Map<String,Collection<Annotation>> annotationsMap)
Convert a GATE document to JSON representation and return it as a
string.
|
String |
DocumentImpl.toXml(Set<Annotation> aSourceAnnotationSet)
Returns an XML document aming to preserve the original markups( the
original markup will be in the same place and format as it was before
processing the document) and include (if possible) the annotations
specified in the aSourceAnnotationSet.
|
String |
DocumentImpl.toXml(Set<Annotation> aSourceAnnotationSet,
boolean includeFeatures)
Returns an XML document aming to preserve the original markups( the
original markup will be in the same place and format as it was before
processing the document) and include (if possible) the annotations
specified in the aSourceAnnotationSet.
|
static void |
DocumentStaxUtils.writeAnnotationSet(Collection<Annotation> annotations,
String asName,
XMLStreamWriter xsw,
String namespaceURI)
Writes the given annotation set to an XMLStreamWriter as GATE XML
format.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Long start,
Long end,
Map<String,Collection<Annotation>> annotationsMap,
com.fasterxml.jackson.core.JsonGenerator json)
Write a substring of a GATE document to the specified
JsonGenerator.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Long start,
Long end,
Map<String,Collection<Annotation>> annotationsMap,
Map<?,?> extraFeatures,
com.fasterxml.jackson.core.JsonGenerator json)
Write a substring of a GATE document to the specified
JsonGenerator.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Long start,
Long end,
Map<String,Collection<Annotation>> annotationsMap,
Map<?,?> extraFeatures,
String annotationTypeProperty,
com.fasterxml.jackson.core.JsonGenerator json)
Write a substring of a GATE document to the specified
JsonGenerator.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Long start,
Long end,
Map<String,Collection<Annotation>> annotationsMap,
Map<?,?> extraFeatures,
String annotationTypeProperty,
String annotationIDProperty,
com.fasterxml.jackson.core.JsonGenerator json)
Write a substring of a GATE document to the specified
JsonGenerator.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Map<String,Collection<Annotation>> annotationsMap,
File out)
Write a GATE document to the specified File.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Map<String,Collection<Annotation>> annotationsMap,
com.fasterxml.jackson.core.JsonGenerator json)
Write a GATE document to the specified JsonGenerator.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Map<String,Collection<Annotation>> annotationsMap,
OutputStream out)
Write a GATE document to the specified OutputStream.
|
static void |
DocumentJsonUtils.writeDocument(Document doc,
Map<String,Collection<Annotation>> annotationsMap,
Writer out)
Write a GATE document to the specified Writer.
|
static void |
DocumentStaxUtils.writeDocument(Document doc,
Map<String,Collection<Annotation>> annotationSets,
XMLStreamWriter xsw,
String namespaceURI)
Write the specified GATE Document to an XMLStreamWriter.
|
static void |
DocumentStaxUtils.writeTextWithNodes(Document doc,
Collection<Collection<Annotation>> annotationSets,
XMLStreamWriter xsw,
String namespaceURI)
Writes the content of the given document to an XMLStreamWriter as a
mixed content element called "TextWithNodes".
|
static void |
DocumentStaxUtils.writeXcesAnnotations(Collection<Annotation> annotations,
OutputStream os,
String encoding)
Save annotations to the given output stream in XCES format, with
their IDs included as the "n" attribute of each
struct . |
static void |
DocumentStaxUtils.writeXcesAnnotations(Collection<Annotation> annotations,
XMLStreamWriter xsw)
Save annotations to the given XMLStreamWriter in XCES format, with
their IDs included as the "n" attribute of each
struct . |
static void |
DocumentStaxUtils.writeXcesAnnotations(Collection<Annotation> annotations,
XMLStreamWriter xsw,
boolean includeId)
Save annotations to the given XMLStreamWriter in XCES format.
|
Modifier and Type | Method and Description |
---|---|
Annotation |
AnnotationVisualResource.getAnnotationCurrentlyEdited() |
Modifier and Type | Method and Description |
---|---|
void |
AnnotationVisualResource.editAnnotation(Annotation ann,
AnnotationSet set)
Changes the annotation currently being edited.
|
Modifier and Type | Method and Description |
---|---|
Annotation |
AnnotationSetEvent.getAnnotation()
Gets the annotation that has been added or removed
|
Constructor and Description |
---|
AnnotationEvent(Annotation source,
int type)
Constructor.
|
AnnotationSetEvent(AnnotationSet source,
int type,
Document sourceDocument,
Annotation annotation)
Constructor.
|
Modifier and Type | Field and Description |
---|---|
protected LinkedList<Annotation> |
SearchAndAnnotatePanel.annotateAllAnnotationsID
List of annotations ID that have been created by the
AnnotateAllMatchesAction.
|
Modifier and Type | Method and Description |
---|---|
Annotation |
AnnotationDataImpl.getAnnotation() |
Annotation |
AnnotationData.getAnnotation()
Gets the
Annotation object represented by this structure. |
Annotation |
AnnotationEditorOwner.getNextAnnotation()
Called by the editor for obtaining the next annotation to be edited.
|
Annotation |
AnnotationEditorOwner.getPreviousAnnotation()
Called by the editor for obtaining the previous annotation to be edited.
|
Modifier and Type | Method and Description |
---|---|
void |
AnnotationEditorOwner.annotationChanged(Annotation ann,
AnnotationSet set,
String oldType)
Called by the annotation editor when an annotation has been
changed.
|
Constructor and Description |
---|
AnnotationDataImpl(AnnotationSet set,
Annotation ann) |
Modifier and Type | Field and Description |
---|---|
protected Annotation |
AnnotationEditor.ann
The annotation being edited.
|
Modifier and Type | Method and Description |
---|---|
Annotation |
CorefEditor.findOutTheLongestAnnotation(List<Integer> matches,
AnnotationSet set)
Given arrayList containing Ids of the annotations, and an annotationSet, this method
returns the annotations that has longest string among the matches
|
Annotation |
AnnotationEditor.getAnnotationCurrentlyEdited() |
Annotation |
AnnotationListView.getNextAnnotation() |
Annotation |
AnnotationSetsView.getNextAnnotation() |
Annotation |
AnnotationListView.getPreviousAnnotation() |
Annotation |
AnnotationSetsView.getPreviousAnnotation() |
Modifier and Type | Method and Description |
---|---|
void |
AnnotationStack.addAnnotation(Annotation annotation)
Add an annotation to the current stack row.
|
AnnotationDataImpl |
AnnotationListView.addAnnotation(Annotation ann,
AnnotationSet set)
Adds an annotation to be displayed in the list.
|
void |
AnnotationSetsView.TypeHandler.annotationAdded(Annotation ann)
Notifies this type handler that a new annotation was created of the
right type
|
void |
AnnotationListView.annotationChanged(Annotation ann,
AnnotationSet set,
String oldType) |
void |
AnnotationSetsView.annotationChanged(Annotation ann,
AnnotationSet set,
String oldType) |
void |
AnnotationSetsView.TypeHandler.annotationRemoved(Annotation ann)
Notifies this type handler that an annotation has been removed
|
void |
AnnotationEditor.editAnnotation(Annotation ann,
AnnotationSet set) |
List<Action> |
AnnotationListView.getGenericEditorActions(AnnotationSet set,
Annotation annotation) |
List<Action> |
AnnotationListView.getSpecificEditorActions(AnnotationSet set,
Annotation annotation) |
String |
CorefEditor.getString(Annotation ann)
Given an annotation, this method returns the string of that annotation
|
protected void |
AnnotationEditor.moveAnnotation(AnnotationSet set,
Annotation oldAnnotation,
Long newStartOffset,
Long newEndOffset)
Changes the span of an existing annotation by creating a new annotation
with the same ID, type and features but with the new start and end offsets.
|
void |
CorefEditor.removeChainReference(Annotation annot,
CorefEditor.CorefTreeNode chainHead)
Removes the reference of this annotation from the current chain.
|
void |
TextualDocumentView.scrollAnnotationToVisible(Annotation ann) |
void |
AnnotationSetsView.selectAnnotation(Annotation ann,
AnnotationSet annSet)
Sets a particular annotation as selected.
|
Modifier and Type | Method and Description |
---|---|
List<AnnotationData> |
AnnotationListView.addAnnotations(List<Annotation> annotations,
AnnotationSet set)
Adds a batch of annotations in one go.
|
Constructor and Description |
---|
EditAnnotationAction(AnnotationSet set,
Annotation ann,
AnnotationVisualResource editor) |
Modifier and Type | Field and Description |
---|---|
Set<Annotation> |
AnnotationDiffer.correctAnnotations |
protected List<Annotation> |
AnnotationDiffer.keyList
A list with all the key annotations
|
Set<Annotation> |
AnnotationDiffer.missingAnnotations |
Set<Annotation> |
AnnotationDiffer.partiallyCorrectAnnotations |
protected List<Annotation> |
AnnotationDiffer.responseList
A list with all the response annotations
|
Set<Annotation> |
AnnotationDiffer.spuriousAnnotations |
Modifier and Type | Method and Description |
---|---|
Annotation |
AnnotationDiffer.Pairing.getKey()
Gets the key annotation of the pairing.
|
Annotation |
AnnotationDiffer.PairingImpl.getKey() |
Annotation |
AnnotationDiffer.Pairing.getResponse()
Gets the response annotation of the pairing.
|
Annotation |
AnnotationDiffer.PairingImpl.getResponse() |
Modifier and Type | Method and Description |
---|---|
Set<Annotation> |
AnnotationDiffer.getAnnotationsOfType(int type)
A method that returns specific type of annotations
|
Modifier and Type | Method and Description |
---|---|
int |
OffsetComparator.compare(Annotation a1,
Annotation a2) |
Modifier and Type | Method and Description |
---|---|
List<AnnotationDiffer.Pairing> |
AnnotationDiffer.calculateDiff(Collection<Annotation> key,
Collection<Annotation> response)
Computes a diff between two collections of annotations.
|
List<AnnotationDiffer.Pairing> |
AnnotationDiffer.calculateDiff(Collection<Annotation> key,
Collection<Annotation> response)
Computes a diff between two collections of annotations.
|
static void |
AnnotationMerging.mergeAnnotation(AnnotationSet[] annsArr,
String nameFeat,
HashMap<Annotation,String> mergeAnns,
int numMinK,
boolean isTheSameInstances)
Merge all annotationset from an array.
|
static void |
AnnotationMerging.mergeAnnotationMajority(AnnotationSet[] annsArr,
String nameFeat,
HashMap<Annotation,String> mergeAnns,
boolean isTheSameInstances)
Merge all annotationset from an array.
|
protected void |
CorpusBenchmarkTool.printAnnotations(Set<Annotation> set,
Document doc) |
protected void |
CorpusBenchmarkTool.storeAnnotations(String type,
Set<Annotation> set,
Document doc,
Writer file) |
Copyright © 2024 GATE. All rights reserved.