Mon Oct 2 13:39:25 CEST 2006 pdm@brailcom.org
authorpdm <pdm>
Mon, 2 Oct 2006 11:41:01 +0000 (11:41 +0000)
committerpdm <pdm>
Mon, 2 Oct 2006 11:41:01 +0000 (11:41 +0000)
  * Don't crash when there are no syllables in a stress unit

czech.scm

index f5d1904..12aa040 100644 (file)
--- a/czech.scm
+++ b/czech.scm
           (let ((nsyls (czech-unit-syllable-count unit)))
             (let ((contour (czech-random-choice
                             (cdr (assoc (list contourtype
-                                              (if (<= nsyls 6) nsyls 6))
+                                              (cond
+                                               ((< nsyls 1)
+                                                1)
+                                               ((> nsyls 6)
+                                                6)
+                                               (t
+                                                nsyls)))
                                         czech-int-contours)))))
               ;; Adjust the first syllables of final contours
               (if (or (string-equal position "F")