summaryrefslogtreecommitdiff
path: root/phonology.py
diff options
context:
space:
mode:
Diffstat (limited to 'phonology.py')
-rw-r--r--phonology.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/phonology.py b/phonology.py
index 2e8d978..1853523 100644
--- a/phonology.py
+++ b/phonology.py
@@ -10,6 +10,16 @@ class Phonology(object):
self.functions = functions
self.paths = paths
+ def print(self):
+ features = {
+ 'footprints': self.footprints,
+ 'functions': self.functions,
+ 'paths': self.paths,
+ }
+ print("\nPhonology")
+ pprint(features)
+ print()
+
def addFootprintRule(self, footprintRule, weight=1):
self.footprints.append((footprintRule, weight))
@@ -19,9 +29,9 @@ class Phonology(object):
def addPathRule(self, pathRule, weight=1):
self.paths.append((pathRule, weight))
- def makeCadence(self): # (duration=None, harmonicFilter=None)
+ def makeCadence(self, label=''): # (duration=None, harmonicFilter=None)
""" assemble bundle of features from phonology rules """
- cadence = Cadence()
+ cadence = Cadence(label=label)
cadence.footprint = self.makeFootprint()
cadence.function = self.makeFunction()
cadence.path = self.makePath()