|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--notio.translators.SimpleInfoUnit | +--notio.translators.DefiningLabelTable
A TranslationInfoUnit that serves as a symbol table relating defining labels to defining concepts and coreference sets. This table allows stack-like operations for maintaining label scope.
Inner Class Summary | |
class |
DefiningLabelTable.TableEntry
An inner class used to hold table entries. |
Constructor Summary | |
DefiningLabelTable()
Constructs a new DefiningLabelTable. |
|
DefiningLabelTable(DefiningLabelTable orgTable)
Constructs a new DefiningLabelTable by copying the specified table. |
Method Summary | |
void |
addBoundConcept(java.lang.String newLabel,
Concept newBoundConcept)
Adds an entry to the table that relates the specified label to the specified bound concept. |
void |
addCoreferenceSet(java.lang.String definingLabel,
CoreferenceSet corefSet)
Adds an entry to the table that relates the specified label to the specified coreference set. |
void |
addDefiningConcept(java.lang.String newLabel,
Concept newDefConcept)
Adds an entry to the table that relates the specified label to the specified defining concept. |
void |
clearDefiningLabelToCoreferenceSetMapping()
Clears all existing mappings between coreference labels and coreference sets. |
void |
clearDefiningLabelToDefiningConceptMapping()
Clears all existing mappings between defining concepts and defining labels. |
TranslationInfoUnit |
copyUnit()
Returns a duplicate of this information unit that is distinct from the original. |
DefiningLabelTable.TableEntry |
findDefiningEntryByLabel(java.lang.String label)
Finds the first (topmost) defining entry corresponding to the specified label. |
DefiningLabelTable.TableEntry |
findEntryByConcept(Concept concept)
Finds the entry corresponding to the specified Concept. |
DefiningLabelTable.TableEntry |
findEntryByCoreferenceSet(CoreferenceSet corefSet)
Finds the entry corresponding to the specified CoreferenceSet. |
DefiningLabelTable.TableEntry |
findEntryByDefiningConcept(Concept defConcept)
Finds the entry corresponding to the specified defining Concept. |
DefiningLabelTable.TableEntry |
findFirstEntryByLabel(java.lang.String label)
Finds the first (topmost) entry corresponding to the specified label. |
DefiningLabelTable.TableEntry |
findLocalEntryByLabel(java.lang.String label)
Finds an entry in the current context corresponding to the specified label. |
int |
getCurrentContextLevel()
Returns the current context level of this table. |
java.lang.String |
getLastDefiningLabel()
Returns the last defining label generated by this context or null if no labels have generated. |
java.lang.String |
getNextAvailableDefiningLabel()
Returns a new defining label that is not already present in the defining label/coreference set mapping. |
void |
popContext()
Pops a context off the stack. |
void |
pushContext()
Pushes a new context onto the stack. |
void |
resetAvailableDefiningLabel()
Resets the generator for defining labels so that it starts again. |
void |
resetUnit()
Resets this information unit to its initial state. |
Methods inherited from class notio.translators.SimpleInfoUnit |
getUnitName, setUnitName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefiningLabelTable()
public DefiningLabelTable(DefiningLabelTable orgTable)
orgTable
- the table to be copied.Method Detail |
public final void pushContext()
public final void popContext()
public final DefiningLabelTable.TableEntry findEntryByConcept(Concept concept)
concept
- the concept to be found.public final DefiningLabelTable.TableEntry findEntryByDefiningConcept(Concept defConcept)
defConcept
- the defining concept to be found.public final DefiningLabelTable.TableEntry findEntryByCoreferenceSet(CoreferenceSet corefSet)
corefSet
- the coreference set to be found.public final DefiningLabelTable.TableEntry findLocalEntryByLabel(java.lang.String label)
label
- the label to be found.public final DefiningLabelTable.TableEntry findDefiningEntryByLabel(java.lang.String label)
label
- the label to be found.public final DefiningLabelTable.TableEntry findFirstEntryByLabel(java.lang.String label)
label
- the label to be found.public final void addDefiningConcept(java.lang.String newLabel, Concept newDefConcept)
newLabel
- the label to be be added.newDefConcept
- the defining concept to be added.public final void addBoundConcept(java.lang.String newLabel, Concept newBoundConcept)
newLabel
- the label to be be added.newBoundConcept
- the bound concept to be added.public void addCoreferenceSet(java.lang.String definingLabel, CoreferenceSet corefSet)
definingLabel
- the defining label being mapped.corefSet
- the coreference set being mapped.java.lang.IllegalArgumentException
- if the label is already
associated with some other coreference set,
or if it is associated with a defining concept other than the one in
the coreference set.public void clearDefiningLabelToCoreferenceSetMapping()
public void clearDefiningLabelToDefiningConceptMapping()
public java.lang.String getNextAvailableDefiningLabel()
public void resetAvailableDefiningLabel()
public int getCurrentContextLevel()
public java.lang.String getLastDefiningLabel()
public void resetUnit()
public TranslationInfoUnit copyUnit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |