public class IntentInsert extends Intent
Intent.Type
baseNode, contextChain, endingVertex, grammarContext, ID, initialVertex, nodeRepair, nodeSequence, SEPARATOR
Constructor and Description |
---|
IntentInsert(Vertex initialVertex,
Vertex endingVertex,
Context grammarContext,
java.util.List<Context> contextChain,
java.lang.String nodeLabel)
Creates a new instance of the insert correction intent.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
computeIdentifierPostfix()
Computes the postfix part of the intent local identifier.
|
protected java.lang.String |
computeIntentSignature()
Computes the intent signature string.
|
static void |
generateIntentFix(java.util.List<Edit> nodeEdit,
java.util.List<Mend> sequenceMends)
Generates all mends for the particular intent repair of insert type.
|
static void |
generateNestedIntents(java.util.List<Intent> outputSet,
Intent parentIntent,
int initialStratum,
java.lang.String initialState,
Grammar treeGrammar,
java.util.Map<java.lang.String,java.lang.String> transitions)
Generates the set of all permitted nested insert intents.
|
java.util.Set<Intent.Type> |
getAllowedIntents()
Returns the set of correction intent types allowed for nesting.
|
Intent.Type |
getIntentType()
Returns the type of the given correction intent.
|
computeChainSignature, computeIdentifierPrefix, computeIntentIdentifier, equals, generateNestedIntents, getBaseNode, getContextChain, getEndingVertex, getGlobalSignature, getGrammarContext, getInitialVertex, getLastStratum, getLocalIdentifier, getNodeRepair, getNodesSequence, getSequenceLength, getSourceState, getTargetStates, getUniqueLabel, hashCode, printDebugDump, resetIdProvider
public IntentInsert(Vertex initialVertex, Vertex endingVertex, Context grammarContext, java.util.List<Context> contextChain, java.lang.String nodeLabel)
initialVertex
- Pair of the initial stratum and state.endingVertex
- Pair of the ending stratum and state.grammarContext
- Nested grammar context reference.contextChain
- Optional chain of grammar contexts.nodeLabel
- New label (terminal) of the inserted node.public Intent.Type getIntentType()
Intent
getIntentType
in class Intent
public java.util.Set<Intent.Type> getAllowedIntents()
Intent
getAllowedIntents
in class Intent
protected java.lang.String computeIntentSignature()
Intent
computeIntentSignature
in class Intent
protected java.lang.String computeIdentifierPostfix()
Intent
computeIdentifierPostfix
in class Intent
public static void generateNestedIntents(java.util.List<Intent> outputSet, Intent parentIntent, int initialStratum, java.lang.String initialState, Grammar treeGrammar, java.util.Map<java.lang.String,java.lang.String> transitions)
outputSet
- Output container for generated intents.parentIntent
- Parental correction intent reference.initialStratum
- Number of the initial stratum.initialState
- Name of the initial state.treeGrammar
- Reference to the tree grammar.transitions
- Set of transitions from the initial state.public static void generateIntentFix(java.util.List<Edit> nodeEdit, java.util.List<Mend> sequenceMends)
nodeEdit
- Sequence of edit operations repairing the node.sequenceMends
- Set of all mends of the sequence repair.