Mon Oct 2 13:38:27 CEST 2006 pdm@brailcom.org
authorpdm <pdm>
Mon, 2 Oct 2006 11:40:52 +0000 (11:40 +0000)
committerpdm <pdm>
Mon, 2 Oct 2006 11:40:52 +0000 (11:40 +0000)
  * Merging prepositions to the following words fixed

czech.scm

index a67ebab..f5d1904 100644 (file)
--- a/czech.scm
+++ b/czech.scm
 (define (czech-identify-stress-units sylwords)
   (let ((units (mapcar list sylwords))
         (unit-word (lambda (unit)
-                     (and (eqv? (length unit) 1)
+                     (and (not (null? unit))
                           (item.parent
-                           (item.relation (car unit) 'SylStructure)))))
+                           (item.relation (car (last unit)) 'SylStructure)))))
         (unit-word-name (lambda (unit)
                           (and (eqv? (length unit) 1)
                                (item.feat (car unit)
             (while units*
               (let ((w (unit-word (car units*))))
                 (if (or ;; Join non-syllabic prepositions
-                     (czech-item.feat? w 'pos 'prep0)
-                     ;; Join proper single-syllabic prepositions
-                     (and (member (czech-downcase (item.name w))
-                                  czech-proper-single-syl-prepositions)
-                          (not (czech-item.feat? w "pos" "se"))))
-                    (merge units*)))
-              (set! units* (cdr units*))))
+                        (czech-item.feat? w 'pos 'prep0)
+                        ;; Join proper single-syllabic prepositions
+                        (and (member (czech-downcase (item.name w))
+                                     czech-proper-single-syl-prepositions)
+                             (not (czech-item.feat? w "pos" "se"))))
+                    (merge units*)
+                    (set! units* (cdr units*))))))
           ;; At most 1 word now?
           (if (<= (length units) 1)
               units