[clml] r138 committed - Added tutorial files.

0 views
Skip to first unread message

cl...@googlecode.com

unread,
Jul 12, 2011, 4:08:00 PM7/12/11
to cl...@googlegroups.com
Revision: 138
Author: sbo...@isetsu.net
Date: Tue Jul 12 13:07:52 2011
Log: Added tutorial files.
http://code.google.com/p/clml/source/detail?r=138

Added:
/trunk/pyphon/src/tutorial-harmony/simple_harmony.csv

=======================================
--- /dev/null
+++ /trunk/pyphon/src/tutorial-harmony/simple_harmony.csv Tue Jul 12
13:07:52 2011
@@ -0,0 +1,97 @@
+# This is the model file, and defines the constraints and symbols of an OT
or HG grammar.
+
+Option, cacheConstraints, False
+
+# Tells pyphon-makemodel.py to output a dot-file figure of each constraint
+# described below
+
+Option, drawConstraints, False
+
+# Tells pyphon-makemodel.py to output a dot-file figure of the weighted
+# finite-state transducer, EVAL, that results from intersecting all of the
+# constraints in CON.
+
+Option, drawEval, False
+
+# Define new symbols as referring to feature bundles
+
+NewFeatures, C, +cons, +seg
+NewFeatures, I, +high, -low, +back, -round, -cons, +seg
+NewFeatures, a, -high, +low, +back, -round, -cons, +seg
+NewFeatures, u, +high, -low, +back, +round, -cons, +seg
+NewFeatures, o, -high, -low, +back, +round, -cons, +seg
+
+# These symbols have fixed meanings to recurse and twotier, so keep them in
+# (with whatever features you want) if you plan to use cyclic evaluation.
+
+NewFeatures, #, +marker, +root
+NewFeatures, ., +marker, -root
+
+
+# The inventory of symbols (either defined by NewFeatures commands above,
or in
+# the default symbol set). Symbols defined but not listed will not be
active.
+Inventory, C, I, a, u, o, #, .
+
+# Define new finite-state constraints using regular expression syntax.
+
+#Basic markedness
+NewConstraint, rd, _[-cons, +round]_
+
+NewConstraint, round_low, _[-cons, +round, -high]_
+
+#Basic faithfulness
+
+# Constraints defined with multiple regular expressions (multiple lines)
are violated whenever any
+# one definition is violated.
+
+NewConstraint, io_ident_v_round, _[-cons, +round]:[-cons, -round]_
+NewConstraint, io_ident_v_round, _[-cons, -round]:[-cons, +round]_
+
+NewConstraint, io_ident_v_high, _[-cons, +high]:[-cons, -high]_
+NewConstraint, io_ident_v_high, _[-cons, -high]:[-cons, +high]_
+
+NewConstraint, io_ident_v_low, _[-cons, +low]:[-cons, -low]_
+NewConstraint, io_ident_v_low, _[-cons, -low]:[-cons, +low]_
+
+NewConstraint, io_ident_v_back, _[-cons, +back]:[-cons, -back]_
+NewConstraint, io_ident_v_back, _[-cons, -back]:[-cons, +back]_
+
+#Harmony
+NewConstraint, agree_v_round, [-cons, -round]([+cons]|[+marker])*_[-cons,
+round]_
+NewConstraint, agree_v_round, [-cons, +round]([+cons]|[+marker])*_[-cons,
-round]_
+
+NewConstraint, agree_v_back, [-cons, -back]([+cons]|[+marker])*_[-cons,
+back]_
+NewConstraint, agree_v_back, [-cons, +back]([+cons]|[+marker])*_[-cons,
-back]_
+
+#Stem-affixed form identity
+NewConstraint, io_ident_root_v_back, \#@*_[-cons, -back]:[-cons,
+back]_@*\#
+NewConstraint, io_ident_root_v_back, \#@*_[-cons, +back]:[-cons,
-back]_@*\#
+
+NewConstraint, io_ident_root_v_round, \#@*_[-cons, -round]:[-cons,
+round]_@*\#
+NewConstraint, io_ident_root_v_round, \#@*_[-cons, +round]:[-cons,
-round]_@*\#
+
+NewConstraint, io_ident_root_v_low, \#@*_[-cons, -low]:[-cons, +low]_@*\#
+NewConstraint, io_ident_root_v_low, \#@*_[-cons, +low]:[-cons, -low]_@*\#
+
+NewConstraint, io_ident_root_v_high, \#@*_[-cons, -high]:[-cons,
+high]_@*\#
+NewConstraint, io_ident_root_v_high, \#@*_[-cons, +high]:[-cons,
-high]_@*\#
+
+#Position-specific markedness
+NewConstraint, condition_c, [-cons]([+cons]|[+marker])*_[-cons, -high,
+round]_
+
+#Unidirectional faithfulness
+NewConstraint, unfaith_rd_hi, _[-cons, -round, -high]:[-cons, +round,
-high]_
+
+NewConstraint, unfaith_rd, _[-cons, -round]:[-cons, +round]_
+
+# Strict filters take the form of constraints, but must hold of all
outputs.
+
+# If you are using cyclic evaluation, make sure that \# and \. go to
either themselves or nothing,
+# and that cannot be epenthesized in the output. Something of the format
+# (...|\#:\#|\.:\.)* should do the trick.
+
+NewStrictFilter, structure, ([+cons]:[+cons]|[-cons]:[-cons]|\#:\#|\.:\.)*
+
+#List the constraints that you want to use in evaluation - the rest do
nothing
+
+CON, structure, io_ident_v_high, io_ident_v_round, agree_v_round,
unfaith_rd_hi

Reply all
Reply to author
Forward
0 new messages