Package com.keenresearch.keenasr
Class KASRAlignmentItem
java.lang.Object
com.keenresearch.keenasr.KASRAlignmentItem
A single step in an alignment trace.
For an
KASRAlignOp.INSERTION, refIndex is -1 and
refToken is empty. For a KASRAlignOp.DELETION,
recIndex is -1 and recToken is empty. For
KASRAlignOp.MATCH and KASRAlignOp.SUBSTITUTION, both
indices and tokens are populated.
Indices refer to positions in the post-normalization token vectors; see
KASRTextAligner.getReferenceTokens() for the reference side.-
Method Summary
Modifier and TypeMethodDescriptionfinal KASRAlignOpgetOp()final intfinal Stringfinal intfinal String
-
Method Details
-
getOp
- Returns:
- The edit operation this item represents.
-
getRefIndex
public final int getRefIndex()- Returns:
- Index of the reference token participating in this operation,
or
-1for an insertion.
-
getRecIndex
public final int getRecIndex()- Returns:
- Index of the recognized token participating in this operation,
or
-1for a deletion.
-
getRefToken
- Returns:
- Reference token at
refIndex, or empty for an insertion.
-
getRecToken
- Returns:
- Recognized token at
recIndex, or empty for a deletion.
-