Package ca.phon.ipadictionary
Class ContractionRule
java.lang.Object
ca.phon.ipadictionary.ContractionRule
- All Implemented Interfaces:
Serializable
Rule for handling contractions.
Rules are in format
A -> B
Where A is a set of conditions for matching
this rule and B is a list of instructions for
building the transcription.
A conditions can be matched for the left-hand
contraction, transcript of left-hand contraction
and same on right side. Conditions can be specified
as plain text, regular expressions or phonex expressions.
B instructions an include any of the input values
or literal values.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildTranscript
(String lhs, String rhs, String tlhs, String trhs) List<ca.phon.ipadictionary.ContractionRule.VClause>
getVExpr()
boolean
Check to see if the given string matches our LHS+RHS expressions.static ContractionRule
parseContractionRule
(String text) void
setLhsExpr
(String lhsExpr) void
setLhsType
(ContractionRule.ConditionType lhsType) void
setRhsExpr
(String rhsExpr) void
setRhsType
(ContractionRule.ConditionType rhsType) void
setTBuilder
(List<ca.phon.ipadictionary.ContractionRule.VClause> builder) void
setTlhsExpr
(String tlhsExpr) void
setTlhsType
(ContractionRule.ConditionType tlhsType) void
setTrhsExpr
(String trhsExpr) void
setTrhsType
(ContractionRule.ConditionType trhsType) void
-
Constructor Details
-
ContractionRule
public ContractionRule()
-
-
Method Details
-
parseContractionRule
-
getLhsExpr
-
setLhsExpr
-
getLhsType
-
setLhsType
-
getRhsExpr
-
setRhsExpr
-
getRhsType
-
setRhsType
-
getTlhsExpr
-
setTlhsExpr
-
getTlhsType
-
setTlhsType
-
getTrhsExpr
-
setTrhsExpr
-
getTrhsType
-
setTrhsType
-
getTBuilder
-
setTBuilder
-
getVExpr
-
setVExpr
-
matches
Check to see if the given string matches our LHS+RHS expressions.- Parameters:
lhs
- - lhs (ortho)rhs
- - rhs (ortho)tlhs
- - lhs (ipa)thrs
- - rhs (ipa)
-
buildTranscript
- Parameters:
lhs
- - lhs (ortho)rhs
- - rhs (ortho)tlhs
- - lhs (ipa)thrs
- - rhs (ipa)- Returns:
-