Package ca.phon.phontalk.parser
Class MorBuilder
java.lang.Object
ca.phon.phontalk.parser.MorBuilder
Utility class for building morphology trees
given strings coded for the CHAT/Phon %mor/Morphology
tiers.
This class will build an antlr3
CommonTree
which
can be used with the chat tree walkers.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.antlr.runtime.tree.CommonTree
attachGrasp
(org.antlr.runtime.tree.CommonTree morTree, org.antlr.runtime.tree.CommonTree graspTree) Attach the given GRASP tree to the given MOR tree.org.antlr.runtime.tree.CommonTree
buildGraspTree
(String gra) Build a GRASP (%gra) tree to attach to mor.org.antlr.runtime.tree.CommonTree
buildMorTree
(String mor) Build a common tree for the given mor string.
-
Constructor Details
-
MorBuilder
public MorBuilder()
-
-
Method Details
-
attachGrasp
public org.antlr.runtime.tree.CommonTree attachGrasp(org.antlr.runtime.tree.CommonTree morTree, org.antlr.runtime.tree.CommonTree graspTree) Attach the given GRASP tree to the given MOR tree.- Parameters:
morTree
-graspTree
-- Returns:
- the reference to the provided morTree
-
buildGraspTree
Build a GRASP (%gra) tree to attach to mor.- Parameters:
gra
- , must be a string of 4 values separated by pipes (i.e., 1|2|3|4)- Returns:
- the grasp tree
- Throws:
IllegalArgumentException
-
buildMorTree
Build a common tree for the given mor string.- Parameters:
mor
-- Returns:
- the generated CommonTree
- Throws:
PhonTalkMessage
- if the string cannot be parsedIllegalArgumentException
-