edu.cmu.minorthird.text
Interface MonotonicTextLabels

All Superinterfaces:
TextLabels
All Known Subinterfaces:
MutableTextLabels
All Known Implementing Classes:
BasicTextLabels, MonotonicSubTextLabels, NestedTextLabels

public interface MonotonicTextLabels
extends TextLabels

Maintains assertions about 'types' and 'properties' of contiguous Spans of these Seq's. Assertions can never be deleted from a MonotonicTextLabels, but they can be added.

Author:
William Cohen

Method Summary
 void addToType(Span span, java.lang.String type)
          Assert that a span has a given type.
 void addToType(Span span, java.lang.String type, Details details)
          Assert that a span has a given type, and associate that assertion with some detailed information.
 void declareType(java.lang.String type)
          Declare a new type, without asserting any spans as members.
 void defineDictionary(java.lang.String dictName, java.util.List<java.lang.String> fileNames, boolean ignoreCase)
          Associate a dictionary from this file
 void defineDictionary(java.lang.String dictName, java.util.Set<java.lang.String> dictionary)
          Associate a dictionary with this labeling.
 void defineTrie(java.util.List<java.lang.String> phraseList)
          Define a trie
 AnnotatorLoader getAnnotatorLoader()
          Get the current AnnotatorLoader.
 Trie getTrie()
          Return a trie if defined
 void setAnnotatedBy(java.lang.String s)
          Record that this TextLabels was annotated with some type of annotation.
 void setAnnotatorLoader(AnnotatorLoader loader)
          Specify the AnnotatorLoader used to find Annotations when a 'require' call is made.
 void setProperty(Span span, java.lang.String prop, java.lang.String value)
          Assert that Span span has the given value of the given property
 void setProperty(Span span, java.lang.String prop, java.lang.String value, Details details)
          Assert that Span span has the given value of the given property, and associate that with some detailed information
 void setProperty(Token token, java.lang.String prop, java.lang.String value)
          Assert that TextToken textToken has the given value of the given property.
 void setProperty(Token token, java.lang.String prop, java.lang.String value, Details details)
          Assert that a token has a given property value, and associate that with some detailed information.
 
Methods inherited from interface edu.cmu.minorthird.text.TextLabels
annotateWith, closureIterator, closureIterator, getDetails, getProperty, getProperty, getSpanProperties, getSpansWithProperty, getSpansWithProperty, getTextBase, getTokenProperties, getTypes, getTypeSet, hasDictionary, hasType, inDict, instanceIterator, instanceIterator, isAnnotatedBy, isType, require, require, showTokenProp
 

Method Detail

defineDictionary

void defineDictionary(java.lang.String dictName,
                      java.util.Set<java.lang.String> dictionary)
Associate a dictionary with this labeling.


defineDictionary

void defineDictionary(java.lang.String dictName,
                      java.util.List<java.lang.String> fileNames,
                      boolean ignoreCase)
Associate a dictionary from this file


getTrie

Trie getTrie()
Return a trie if defined


defineTrie

void defineTrie(java.util.List<java.lang.String> phraseList)
Define a trie


setProperty

void setProperty(Token token,
                 java.lang.String prop,
                 java.lang.String value)
Assert that TextToken textToken has the given value of the given property.


setProperty

void setProperty(Token token,
                 java.lang.String prop,
                 java.lang.String value,
                 Details details)
Assert that a token has a given property value, and associate that with some detailed information. If details==null, this should have the same effect as setProperty(span,prop,value).


setProperty

void setProperty(Span span,
                 java.lang.String prop,
                 java.lang.String value)
Assert that Span span has the given value of the given property


setProperty

void setProperty(Span span,
                 java.lang.String prop,
                 java.lang.String value,
                 Details details)
Assert that Span span has the given value of the given property, and associate that with some detailed information


addToType

void addToType(Span span,
               java.lang.String type)
Assert that a span has a given type.


addToType

void addToType(Span span,
               java.lang.String type,
               Details details)
Assert that a span has a given type, and associate that assertion with some detailed information. If details==null, this should have the same effect as addToType(span,type).


declareType

void declareType(java.lang.String type)
Declare a new type, without asserting any spans as members.


setAnnotatedBy

void setAnnotatedBy(java.lang.String s)
Record that this TextLabels was annotated with some type of annotation.


setAnnotatorLoader

void setAnnotatorLoader(AnnotatorLoader loader)
Specify the AnnotatorLoader used to find Annotations when a 'require' call is made.


getAnnotatorLoader

AnnotatorLoader getAnnotatorLoader()
Get the current AnnotatorLoader.