summaryrefslogtreecommitdiff
path: root/phonology.py
diff options
context:
space:
mode:
authorHouyhnhnm <hykusb@bitmai.la>2018-06-03 13:03:35 +0200
committerHouyhnhnm <hykusb@bitmai.la>2018-06-03 13:03:35 +0200
commitdc5a3bd592f7dda585dc97aa0647b3326b20d8d2 (patch)
tree2f511533ae1e4dbc5356ceda52c493069aabf466 /phonology.py
parentdbd040425b7c066b0803e0f329dd887b11156635 (diff)
add generation methods to phonology, morphology classes
Diffstat (limited to 'phonology.py')
-rw-r--r--phonology.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/phonology.py b/phonology.py
index 1853523..55d1cc6 100644
--- a/phonology.py
+++ b/phonology.py
@@ -98,3 +98,27 @@ class Phonology(object):
path['tilt'] = choice(pathRule['tilt'])
return path
+
+
+class Morphology(object):
+
+ def __init__(self):
+ self.anticipationRules = []
+ self.prolongationRules = []
+
+ def addAnticipationRule(self, projectedFeatures):
+ self.anticipationRules.append(projectedFeatures)
+
+ def addProlongationRule(self, projectedFeatures):
+ self.prolongationRules.append(projectedFeatures)
+
+ def print(self):
+ features = {
+ 'anticipations': self.anticipationRules,
+ 'prolongations': self.prolongationRules,
+ }
+ print("\nMorphology")
+ pprint(features)
+ print()
+
+