|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.combi.CombinationStrategy
de.fu_berlin.ties.combi.OpenCloseStrategy
A combination strategy using open/close tagging (also called "BIE" tagging due to the prefixed used). Classes are prefixed with "B-" (first element of an instance), "I-" (inner element of an instance), "E-" (last element of an instance), or "BE-" (only element of an instance -- begin and end). "O" is used for other/outside of any class.
Field Summary |
Fields inherited from class de.fu_berlin.ties.combi.CombinationStrategy |
CONFIG_COMBINATION |
Constructor Summary | |
OpenCloseStrategy(Set theClasses)
Creates a new instance. |
Method Summary | |
Set |
activeClasses()
Builds a set of class names (Strings) to pass to the classifier to consider for the next decision. |
Set |
allClasses()
Returns an immutable set of all classes (Strings) that can possible occur during classification. |
String |
translateCurrentState(CombinationState currentState)
Translates an expected class in a class name to feed to the classifier in training mode. This method reverses the direction of CombinationStrategy.translateResult(String) .
The return value can be feed to the classifier for training it. |
CombinationState |
translateResult(String predictedClass)
Translates the class predicted by the classifier in a decision for the caller. The end information might be unreliably/absend for same classes. |
Methods inherited from class de.fu_berlin.ties.combi.CombinationStrategy |
createStrategy, createStrategy, getValidClasses, reset, state, toString, updateState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OpenCloseStrategy(Set theClasses)
theClasses
- a set of valid class names (String)Method Detail |
public Set activeClasses()
SortedSet
).
activeClasses
in class CombinationStrategy
public Set allClasses()
allClasses
in class CombinationStrategy
public String translateCurrentState(CombinationState currentState) throws IllegalArgumentException
CombinationStrategy.translateResult(String)
.
The return value can be feed to the classifier for training it.
translateCurrentState
in class CombinationStrategy
currentState
- the current state
IllegalArgumentException
- if the specified argument is invalid
(non-empty string that is not in the set of valid classes, or empty
string when null
was given in the preceding call)public CombinationState translateResult(String predictedClass) throws IllegalArgumentException
translateResult
in class CombinationStrategy
predictedClass
- the class predicted by the classifier
IllegalArgumentException
- if the specified argument was invalid
(not in the set of currently active classes
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |