Skip to content
Snippets Groups Projects
Commit cebb3a31 authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files

Add defaults to syllable.

parent 70f42d3f
No related branches found
No related tags found
No related merge requests found
......@@ -63,15 +63,15 @@ def minimal(full_dict:dict):
class Syllable:
def __init__(self, syllable: str, span: List[int], idx: int,
syllable_length: int, vowel_length: int,
def __init__(self, syllable: str, span: List[int], idx: int = None,
syllable_length: int = 1, vowel_length: int = 1,
phenomena: dict = None):
if len(syllable) != span[1] - span[0]:
raise ValueError('Syllable length does not match syllable span.')
else:
self.text = syllable
self.span = span
self.id = idx
self.id = idx or None
self.syllable_length = syllable_length
self.vowel_length = vowel_length
self.phenomena = phenomena or dict()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment