Package morfologik.fsa
Class MatchResult
java.lang.Object
morfologik.fsa.MatchResult
A matching result returned from
FSATraversal
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The automaton contains a prefix of the input sequence (but the full sequence does not exist).static final int
The automaton has exactly one match for the input sequence.int
Input sequence's index, interpretation depends onkind
.int
One of the match types defined in this class.static final int
The automaton has no match for the input sequence and no sequence in the automaton is a prefix of the input.int
Automaton node, interpretation depends on thekind
.static final int
The sequence is a prefix of at least one sequence in the automaton. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final void
reset
(int kind, int index, int node)
-
Field Details
-
EXACT_MATCH
public static final int EXACT_MATCHThe automaton has exactly one match for the input sequence.- See Also:
-
NO_MATCH
public static final int NO_MATCHThe automaton has no match for the input sequence and no sequence in the automaton is a prefix of the input. Note that to check for a general "input does not exist in the automaton" you have to check for bothNO_MATCH
andAUTOMATON_HAS_PREFIX
.- See Also:
-
AUTOMATON_HAS_PREFIX
public static final int AUTOMATON_HAS_PREFIXThe automaton contains a prefix of the input sequence (but the full sequence does not exist). This translates to: one of the input sequences used to build the automaton is a prefix of the input sequence, but the input sequence contains a non-existent suffix.index
will contain an index of the first character of the input sequence not present in the dictionary.- See Also:
-
SEQUENCE_IS_A_PREFIX
public static final int SEQUENCE_IS_A_PREFIXThe sequence is a prefix of at least one sequence in the automaton.node
returns the node from which all sequences with the given prefix start in the automaton.- See Also:
-
kind
public int kindOne of the match types defined in this class.- See Also:
-
index
public int indexInput sequence's index, interpretation depends onkind
. -
node
public int nodeAutomaton node, interpretation depends on thekind
.
-
-
Constructor Details
-
MatchResult
MatchResult(int kind, int index, int node) -
MatchResult
MatchResult(int kind) -
MatchResult
public MatchResult()
-
-
Method Details
-
reset
final void reset(int kind, int index, int node)
-