|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.minorthird.text.TextBaseManager
public class TextBaseManager
Manages the mappings between TextBases.
This class maintains a mapping of names to instances of TextBase. All of the TextBases in the
mapping are derived from the "root" level TextBase that was added first. Currently there are
two ways to derive a new TextBase from an existing one: filter
and retokenize
.
Constructor Summary | |
---|---|
TextBaseManager(java.lang.String rootBaseName,
TextBase rootBase)
Creates a new TextBaseManager using the specified textbase as the root textbase and the specified name is used in place of "root" to identify it. |
|
TextBaseManager(TextBase rootBase)
Creates a new TextBaseManager using the specified textbase as the root textbase and "root" as the name to identify it. |
Method Summary | |
---|---|
boolean |
containsLevel(java.lang.String levelName)
Returns a boolean indicating whether or not this manager has a level with the specified name |
TextBase |
filter(java.lang.String parentLevelName,
TextLabels parentLabels,
java.lang.String newLevelName,
java.lang.String spanType)
Creates a new TextBase named newLevelName from an existing TextBase named parentLevelName. |
Span |
getMatchingSpan(Span span,
java.lang.String srcName,
java.lang.String dstName)
Finds a mapping path from the source text base to the destination textbase and translates the specified span through each successive mapping until the coresponding span in the destination text base is located. |
Span |
getMatchingSpan(java.lang.String srcName,
java.lang.String srcDocId,
int srcOffset,
int length,
java.lang.String dstName)
Sometimes you may not have a source span, but rather only have a char offset in the source doc. |
TextBase |
getTextBase(java.lang.String name)
Returns the textbase identified by name. |
MutableTextBase |
retokenize(Tokenizer newTokenizer,
java.lang.String parentLevelName,
java.lang.String newLevelName)
Creates a new TextBase named newLevelName from an existing TextBase named parentLevelName. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextBaseManager(TextBase rootBase)
public TextBaseManager(java.lang.String rootBaseName, TextBase rootBase)
Method Detail |
---|
public boolean containsLevel(java.lang.String levelName)
public TextBase getTextBase(java.lang.String name)
public Span getMatchingSpan(java.lang.String srcName, java.lang.String srcDocId, int srcOffset, int length, java.lang.String dstName)
public Span getMatchingSpan(Span span, java.lang.String srcName, java.lang.String dstName)
public MutableTextBase retokenize(Tokenizer newTokenizer, java.lang.String parentLevelName, java.lang.String newLevelName)
public TextBase filter(java.lang.String parentLevelName, TextLabels parentLabels, java.lang.String newLevelName, java.lang.String spanType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |