From 01bce71cea7ec39ff7f7469efd501f19146f900c Mon Sep 17 00:00:00 2001 From: FredericBlum Date: Fri, 4 Oct 2024 11:16:53 +0200 Subject: [PATCH] fix marker issue --- src/cltoolkit/features/phonology.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cltoolkit/features/phonology.py b/src/cltoolkit/features/phonology.py index 66c1d1d..1495459 100644 --- a/src/cltoolkit/features/phonology.py +++ b/src/cltoolkit/features/phonology.py @@ -438,8 +438,9 @@ def syllable_complexity(forms_with_sounds): sounds, count = [], 0 sounds_in_syllable = [] for token in syllable: - sounds_in_syllable += [sounds_in_form[idx]] - idx += 1 + if form.sound_objects[idx].type != "marker": + sounds_in_syllable += [sounds_in_form[idx]] + idx += 1 for sound in sounds_in_syllable: if sound.type not in ['vowel', 'diphthong', 'tone', 'marker'] and \ 'syllabic' not in sound.obj.featureset: