home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / fest-141.zip / festival / lib / tobi.scm < prev    next >
Text File  |  1999-05-30  |  23KB  |  339 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;                                                                       ;;
  3. ;;;                Centre for Speech Technology Research                  ;;
  4. ;;;                     University of Edinburgh, UK                       ;;
  5. ;;;                       Copyright (c) 1996,1997                         ;;
  6. ;;;                        All Rights Reserved.                           ;;
  7. ;;;                                                                       ;;
  8. ;;;  Permission is hereby granted, free of charge, to use and distribute  ;;
  9. ;;;  this software and its documentation without restriction, including   ;;
  10. ;;;  without limitation the rights to use, copy, modify, merge, publish,  ;;
  11. ;;;  distribute, sublicense, and/or sell copies of this work, and to      ;;
  12. ;;;  permit persons to whom this work is furnished to do so, subject to   ;;
  13. ;;;  the following conditions:                                            ;;
  14. ;;;   1. The code must retain the above copyright notice, this list of    ;;
  15. ;;;      conditions and the following disclaimer.                         ;;
  16. ;;;   2. Any modifications must be clearly marked as such.                ;;
  17. ;;;   3. Original authors' names are not deleted.                         ;;
  18. ;;;   4. The authors' names are not used to endorse or promote products   ;;
  19. ;;;      derived from this software without specific prior written        ;;
  20. ;;;      permission.                                                      ;;
  21. ;;;                                                                       ;;
  22. ;;;  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ;;
  23. ;;;  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ;;
  24. ;;;  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ;;
  25. ;;;  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ;;
  26. ;;;  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ;;
  27. ;;;  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ;;
  28. ;;;  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ;;
  29. ;;;  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ;;
  30. ;;;  THIS SOFTWARE.                                                       ;;
  31. ;;;                                                                       ;;
  32. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. ;;;
  34. ;;;   A CART tree for predicting ToBI accents (learned from f2b)
  35. ;;;   punctuation and minimal pos
  36. ;;;
  37.  
  38. ;         NON    !H*  L+H    L*+  
  39. ;     NONE10265  583   66   40    0    0 10954      [10265/10954]      93.710
  40. ;        H* 650 1805   61   57    0    0 2573      [1805/2573]      70.152
  41. ;       !H* 317  241  125   42    0    0  725      [125/725]      17.241
  42. ;      L+H* 457  486   76   80    0    0 1099      [80/1099]       7.279
  43. ;        L*  45  113   14    4    0    0  176      [0/176]       0.000
  44. ;      L*+H   6    6    0    1    0    0   13      [0/13]       0.000
  45. ;          11740 3234  342  224    0    0 
  46. ;total 15540 correct 12275.000 78.990%
  47.  
  48. (set! f2b_int_accent_cart_tree
  49. '
  50. ;; these first few lines are hand written to deal with emphasis (from ssml)
  51. ((R:SylStructure.parent.R:Token.parent.EMPH is 1)
  52.  (((NONE 0.0) (H* 1) (!H* 0.0) (L+H* 0) (L* 0) (L*+H 0) H*))
  53.  ((n.R:SylStructure.parent.R:Token.parent.EMPH is 1)
  54.   (((NONE 1.0) (H* 0) (!H* 0.0) (L+H* 0) (L* 0) (L*+H 0) NONE))
  55.   ((p.R:SylStructure.parent.R:Token.parent.EMPH is 1)
  56.    (((NONE 1.0) (H* 0) (!H* 0.0) (L+H* 0) (L* 0) (L*+H 0) NONE))
  57.  
  58. ((ssyl_in is 10)
  59.  (((NONE 0.99726) (H* 0) (!H* 0.00273973) (L+H* 0) (L* 0) (L*+H 0) NONE))
  60.  ((R:SylStructure.parent.gpos is to)
  61.   (((NONE 0.995984) (H* 0.00401606) (!H* 0) (L+H* 0) (L* 0) (L*+H 0) NONE))
  62.   ((R:SylStructure.parent.gpos is cc)
  63.    (((NONE 0.987768) (H* 0.00611621) (!H* 0) (L+H* 0.00611621) (L* 0) (L*+H 0) NONE))
  64.    ((ssyl_out is 10)
  65.     (((NONE 0.927273) (H* 0.0545455) (!H* 0) (L+H* 0.0181818) (L* 0) (L*+H 0) NONE))
  66.     ((R:SylStructure.parent.gpos is in)
  67.      (((NONE 0.938322) (H* 0.0353618) (!H* 0.00493421) (L+H* 0.0197368) (L* 0.00164474) (L*+H 0) NONE))
  68.      ((R:SylStructure.parent.gpos is wp)
  69.       (((NONE 0.895238) (H* 0.0857143) (!H* 0) (L+H* 0.0190476) (L* 0) (L*+H 0) NONE))
  70.       ((R:SylStructure.parent.gpos is aux)
  71.        (((NONE 0.912281) (H* 0.0380117) (!H* 0.00584795) (L+H* 0.0350877) (L* 0.00584795) (L*+H 0.00292398) NONE))
  72.        ((R:SylStructure.parent.gpos is det)
  73.         (((NONE 0.898004) (H* 0.0643016) (!H* 0.00332594) (L+H* 0.0332594) (L* 0) (L*+H 0.00110865) NONE))
  74.         ((stress is 0)
  75.          (((NONE 0.978415) (H* 0.0144999) (!H* 0.00164772) (L+H* 0.00510793) (L* 0.000329544) (L*+H 0) NONE))
  76.          ((R:SylStructure.parent.R:Word.p.gpos is 0)
  77.           (((NONE 0.209877) (H* 0.716049) (!H* 0) (L+H* 0.0617284) (L* 0.0123457) (L*+H 0) H*))
  78.           ((R:SylStructure.parent.gpos is md)
  79.            (((NONE 0.693548) (H* 0.177419) (!H* 0.0322581) (L+H* 0.0967742) (L* 0) (L*+H 0) NONE))
  80.            ((p.syl_break is 3)
  81.             ((syl_break is 1)
  82.              (((NONE 0.4375) (H* 0.416667) (!H* 0) (L+H* 0.135417) (L* 0.0104167) (L*+H 0) NONE))
  83.              (((NONE 0.171171) (H* 0.666667) (!H* 0) (L+H* 0.144144) (L* 0.018018) (L*+H 0) H*)))
  84.             ((pp.syl_break is 4)
  85.              ((R:SylStructure.parent.R:Word.pp.gpos is in)
  86.               (((NONE 0.0980392) (H* 0.803922) (!H* 0) (L+H* 0.0784314) (L* 0.0196078) (L*+H 0) H*))
  87.               ((syl_out is 0)
  88.                (((NONE 0.0185185) (H* 0.796296) (!H* 0.037037) (L+H* 0.0925926) (L* 0.0555556) (L*+H 0) H*))
  89.                ((R:SylStructure.parent.R:Word.n.gpos is in)
  90.                 (((NONE 0.132353) (H* 0.676471) (!H* 0) (L+H* 0.161765) (L* 0.0294118) (L*+H 0) H*))
  91.                 ((syl_break is 0)
  92.                  (((NONE 0.125) (H* 0.633929) (!H* 0.0133929) (L+H* 0.183036) (L* 0.0401786) (L*+H 0.00446429) H*))
  93.                  ((n.stress is 0)
  94.                   (((NONE 0.364865) (H* 0.567568) (!H* 0) (L+H* 0.0540541) (L* 0.0135135) (L*+H 0) H*))
  95.                   ((p.syl_break is 0)
  96.                    (((NONE 0.612903) (H* 0.290323) (!H* 0) (L+H* 0.0967742) (L* 0) (L*+H 0) NONE))
  97.                    (((NONE 0.32) (H* 0.44) (!H* 0.02) (L+H* 0.22) (L* 0) (L*+H 0) H*))))))))
  98.              ((ssyl_in is 0)
  99.               (((NONE 0.167769) (H* 0.628926) (!H* 0.0214876) (L+H* 0.142975) (L* 0.0363636) (L*+H 0.00247934) H*))
  100.               ((ssyl_out is 4)
  101.                (((NONE 0.490385) (H* 0.240385) (!H* 0.0961538) (L+H* 0.163462) (L* 0.00961538) (L*+H 0) NONE))
  102.                ((pp.syl_break is 3)
  103.                 ((R:SylStructure.parent.R:Word.p.gpos is content)
  104.                  (((NONE 0.346154) (H* 0.346154) (!H* 0.0769231) (L+H* 0.192308) (L* 0.0384615) (L*+H 0) NONE))
  105.                  (((NONE 0.160714) (H* 0.571429) (!H* 0.0178571) (L+H* 0.178571) (L* 0.0714286) (L*+H 0) H*)))
  106.                 ((syl_in is 2)
  107.                  ((n.stress is 0)
  108.                   ((R:SylStructure.parent.R:Word.p.gpos is in)
  109.                    (((NONE 0.218182) (H* 0.618182) (!H* 0.0363636) (L+H* 0.0909091) (L* 0.0181818) (L*+H 0.0181818) H*))
  110.                    ((syl_out is 2)
  111.                     (((NONE 0.0961538) (H* 0.634615) (!H* 0.0961538) (L+H* 0.134615) (L* 0.0384615) (L*+H 0) H*))
  112.                     ((R:SylStructure.parent.R:Word.p.gpos is content)
  113.                      ((syl_out is 4)
  114.                       (((NONE 0.56) (H* 0.12) (!H* 0.08) (L+H* 0.24) (L* 0) (L*+H 0) NONE))
  115.                       (((NONE 0.262821) (H* 0.378205) (!H* 0.121795) (L+H* 0.192308) (L* 0.0448718) (L*+H 0) H*)))
  116.                      (((NONE 0.161905) (H* 0.590476) (!H* 0.0285714) (L+H* 0.171429) (L* 0.047619) (L*+H 0) H*)))))
  117.                   ((n.syl_break is 0)
  118.                    (((NONE 0.551724) (H* 0.293103) (!H* 0) (L+H* 0.155172) (L* 0) (L*+H 0) NONE))
  119.                    (((NONE 0.408451) (H* 0.422535) (!H* 0.056338) (L+H* 0.112676) (L* 0) (L*+H 0) H*))))
  120.                  ((R:SylStructure.parent.R:Word.n.gpos is 0)
  121.                   ((syl_break is 0)
  122.                    (((NONE 0.105263) (H* 0.315789) (!H* 0.157895) (L+H* 0.421053) (L* 0) (L*+H 0) L+H*))
  123.                    (((NONE 0.641509) (H* 0.132075) (!H* 0.132075) (L+H* 0.0943396) (L* 0) (L*+H 0) NONE)))
  124.                   ((syl_break is 1)
  125.                    ((ssyl_in is 3)
  126.                     (((NONE 0.638889) (H* 0.152778) (!H* 0.125) (L+H* 0.0833333) (L* 0) (L*+H 0) NONE))
  127.                     ((p.syl_break is 0)
  128.                      (((NONE 0.551402) (H* 0.186916) (!H* 0.158879) (L+H* 0.0841122) (L* 0.0186916) (L*+H 0) NONE))
  129.                      ((n.stress is 0)
  130.                       ((pp.syl_break is 0)
  131.                        (((NONE 0.413043) (H* 0.184783) (!H* 0.152174) (L+H* 0.23913) (L* 0.0108696) (L*+H 0) NONE))
  132.                        (((NONE 0.2125) (H* 0.3375) (!H* 0.1875) (L+H* 0.2125) (L* 0.05) (L*+H 0) H*)))
  133.                       (((NONE 0.449153) (H* 0.245763) (!H* 0.101695) (L+H* 0.20339) (L* 0) (L*+H 0) NONE)))))
  134.                    ((syl_out is 4)
  135.                     ((nn.syl_break is 0)
  136.                      ((pp.syl_break is 0)
  137.                       (((NONE 0.45614) (H* 0.210526) (!H* 0.192982) (L+H* 0.140351) (L* 0) (L*+H 0) NONE))
  138.                       (((NONE 0.288462) (H* 0.25) (!H* 0.0961538) (L+H* 0.346154) (L* 0) (L*+H 0.0192308) L+H*)))
  139.                      (((NONE 0.163934) (H* 0.459016) (!H* 0.131148) (L+H* 0.245902) (L* 0) (L*+H 0) H*)))
  140.                     ((syl_out is 5)
  141.                      ((R:SylStructure.parent.R:Word.p.gpos is content)
  142.                       (((NONE 0.372881) (H* 0.20339) (!H* 0.169492) (L+H* 0.220339) (L* 0.0338983) (L*+H 0) NONE))
  143.                       (((NONE 0.0961538) (H* 0.673077) (!H* 0.115385) (L+H* 0.0961538) (L* 0.0192308) (L*+H 0) H*)))
  144.                      ((R:SylStructure.parent.R:Word.pp.gpos is in)
  145.                       ((syl_in is 4)
  146.                        (((NONE 0.352113) (H* 0.422535) (!H* 0.15493) (L+H* 0.0704225) (L* 0) (L*+H 0) H*))
  147.                        ((syl_in is 3)
  148.                         (((NONE 0.290323) (H* 0.467742) (!H* 0.0806452) (L+H* 0.145161) (L* 0.016129) (L*+H 0) H*))
  149.                         ((pp.syl_break is 0)
  150.                          (((NONE 0.465517) (H* 0.293103) (!H* 0.172414) (L+H* 0.0689655) (L* 0) (L*+H 0) NONE))
  151.                          ((R:SylStructure.parent.R:Word.p.gpos is content)
  152.                           (((NONE 0.18) (H* 0.36) (!H* 0.28) (L+H* 0.14) (L* 0.04) (L*+H 0) H*))
  153.                           (((NONE 0.0877193) (H* 0.22807) (!H* 0.368421) (L+H* 0.298246) (L* 0.0175439) (L*+H 0) !H*))))))
  154.                       ((ssyl_out is 2)
  155.                        ((p.syl_break is 0)
  156.                         (((NONE 0.634921) (H* 0.174603) (!H* 0.0793651) (L+H* 0.111111) (L* 0) (L*+H 0) NONE))
  157.                         ((pp.syl_break is 0)
  158.                          (((NONE 0.388889) (H* 0.148148) (!H* 0.148148) (L+H* 0.259259) (L* 0.0185185) (L*+H 0.037037) NONE))
  159.                          (((NONE 0.294118) (H* 0.137255) (!H* 0.215686) (L+H* 0.333333) (L* 0.0196078) (L*+H 0) L+H*))))
  160.                        ((R:SylStructure.parent.R:Word.pp.gpos is to)
  161.                         (((NONE 0.0877193) (H* 0.350877) (!H* 0.210526) (L+H* 0.315789) (L* 0.0350877) (L*+H 0) H*))
  162.                         ((syl_break is 3)
  163.                          ((pp.syl_break is 0)
  164.                           (((NONE 0.478261) (H* 0.141304) (!H* 0.195652) (L+H* 0.184783) (L* 0) (L*+H 0) NONE))
  165.                           (((NONE 0.217822) (H* 0.366337) (!H* 0.257426) (L+H* 0.128713) (L* 0.029703) (L*+H 0) H*)))
  166.                          ((syl_in is 7)
  167.                           ((n.stress is 0)
  168.                            ((R:SylStructure.parent.R:Word.n.gpos is content)
  169.                             (((NONE 0.117647) (H* 0.220588) (!H* 0.441176) (L+H* 0.176471) (L* 0.0441176) (L*+H 0) !H*))
  170.                             (((NONE 0.415385) (H* 0.0461538) (!H* 0.2) (L+H* 0.246154) (L* 0.0923077) (L*+H 0) NONE)))
  171.                            (((NONE 0.716981) (H* 0.113208) (!H* 0.0943396) (L+H* 0.0754717) (L* 0) (L*+H 0) NONE)))
  172.                           ((R:SylStructure.parent.R:Word.n.gpos is cc)
  173.                            (((NONE 0.292308) (H* 0.184615) (!H* 0.276923) (L+H* 0.246154) (L* 0) (L*+H 0) NONE))
  174.                            ((nn.syl_break is 3)
  175.                             (((NONE 0.2) (H* 0.333333) (!H* 0.283333) (L+H* 0.15) (L* 0.0333333) (L*+H 0) H*))
  176.                             ((ssyl_in is 4)
  177.                              (((NONE 0.383838) (H* 0.151515) (!H* 0.212121) (L+H* 0.20202) (L* 0.050505) (L*+H 0) NONE))
  178.                              ((p.syl_break is 0)
  179.                               ((n.syl_break is 1)
  180.                                (((NONE 0.526316) (H* 0.210526) (!H* 0.0921053) (L+H* 0.171053) (L* 0) (L*+H 0) NONE))
  181.                                ((ssyl_in is 3)
  182.                                 (((NONE 0.509804) (H* 0.0980392) (!H* 0.215686) (L+H* 0.156863) (L* 0.0196078) (L*+H 0) NONE))
  183.                                 ((pp.syl_break is 0)
  184.                                  (((NONE 0.506667) (H* 0.173333) (!H* 0.106667) (L+H* 0.2) (L* 0.0133333) (L*+H 0) NONE))
  185.                                  ((ssyl_in is 1)
  186.                                   (((NONE 0.1) (H* 0.4) (!H* 0.266667) (L+H* 0.188889) (L* 0.0444444) (L*+H 0) H*))
  187.                                   (((NONE 0.326316) (H* 0.210526) (!H* 0.221053) (L+H* 0.189474) (L* 0.0526316) (L*+H 0) NONE))))))
  188.                               ((R:SylStructure.parent.R:Word.p.gpos is in)
  189.                                (((NONE 0.0625) (H* 0.296875) (!H* 0.265625) (L+H* 0.328125) (L* 0.046875) (L*+H 0) L+H*))
  190.                                ((syl_in is 6)
  191.                                 (((NONE 0.271739) (H* 0.152174) (!H* 0.358696) (L+H* 0.184783) (L* 0.0326087) (L*+H 0) !H*))
  192.                                 ((syl_out is 2)
  193.                                  (((NONE 0.111111) (H* 0.361111) (!H* 0.319444) (L+H* 0.138889) (L* 0.0555556) (L*+H 0.0138889) H*))
  194.                                  ((syl_in is 4)
  195.                                   (((NONE 0.224) (H* 0.152) (!H* 0.328) (L+H* 0.24) (L* 0.056) (L*+H 0) !H*))
  196.                                   ((n.stress is 0)
  197.                                    ((syl_in is 3)
  198.                                     (((NONE 0.0833333) (H* 0.333333) (!H* 0.233333) (L+H* 0.216667) (L* 0.133333) (L*+H 0) H*))
  199.                                     (((NONE 0.283465) (H* 0.188976) (!H* 0.23622) (L+H* 0.204724) (L* 0.0708661) (L*+H 0.015748) NONE)))
  200.                                    (((NONE 0.305263) (H* 0.284211) (!H* 0.210526) (L+H* 0.178947) (L* 0.0210526) (L*+H 0) NONE))))))))))))))))))))))))))))))))))))))))
  201. )
  202.  
  203. ;          NON             L-L  L-H  H-L  
  204. ;    NONE13017    0    0    0    0    0 13017      [13017/13017]     100.000
  205. ;       H- 339   81    0    1    1    0  422      [81/422]      19.194
  206. ;       L- 223   52    0    5    0    0  280      [0/280]       0.000
  207. ;     L-L%  17    0    0 1057   96    0 1170      [1057/1170]      90.342
  208. ;     L-H%  16    0    0  457  139    0  612      [139/612]      22.712
  209. ;     H-L%   5    0    0   30    4    0   39      [0/39]       0.000
  210. ;        13617  133    0 1550  240    0 
  211. ;total 15540 correct 14294.000 91.982%
  212. (set! f2b_int_tone_cart_tree
  213. '((lisp_syl_yn_question is 1)
  214.   (((H-H% 1.0) H-H%))
  215. ((R:SylStructure.parent.gpos is cc)
  216.  (((NONE 0.996942) (H- 0.0030581) (L- 0) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  217.  ((ssyl_in is 10)
  218.   (((NONE 0.989041) (H- 0.00273973) (L- 0) (L-L% 0.00273973) (L-H% 0.00547945) (H-L% 0) NONE))
  219.   ((R:SylStructure.parent.gpos is md)
  220.    (((NONE 0.986014) (H- 0) (L- 0) (L-L% 0.00699301) (L-H% 0.00699301) (H-L% 0) NONE))
  221.    ((p.old_syl_break is 4)
  222.     (((NONE 0.99462) (H- 0.00239091) (L- 0.00119546) (L-L% 0) (L-H% 0.00119546) (H-L% 0.000597729) NONE))
  223.     ((R:SylStructure.parent.gpos is det)
  224.      (((NONE 0.984635) (H- 0.00512164) (L- 0.00384123) (L-L% 0.00384123) (L-H% 0.00256082) (H-L% 0) NONE))
  225.      ((n.old_syl_break is 3)
  226.       (((NONE 0.981848) (H- 0.00495049) (L- 0.00330033) (L-L% 0.00660066) (L-H% 0.00330033) (H-L% 0) NONE))
  227.       ((n.old_syl_break is 4)
  228.        (((NONE 0.986982) (H- 0.000591716) (L- 0.0100592) (L-L% 0.00118343) (L-H% 0.00118343) (H-L% 0) NONE))
  229.        ((R:SylStructure.parent.gpos is in)
  230.         (((NONE 0.977865) (H- 0.00390625) (L- 0.00390625) (L-L% 0.0078125) (L-H% 0.00651042) (H-L% 0) NONE))
  231.         ((old_syl_break is 4)
  232.          ((R:SylStructure.parent.R:Word.n.gpos is 0)
  233.           (((NONE 0) (H- 0.00892857) (L- 0) (L-L% 0.982143) (L-H% 0.00892857) (H-L% 0) L-L%))
  234.           ((R:SylStructure.parent.R:Word.p.gpos is aux)
  235.            (((NONE 0) (H- 0) (L- 0) (L-L% 0.761905) (L-H% 0.238095) (H-L% 0) L-L%))
  236.            ((R:SylStructure.parent.R:Word.n.gpos is det)
  237.             (((NONE 0) (H- 0) (L- 0) (L-L% 0.652542) (L-H% 0.347458) (H-L% 0) L-L%))
  238.             ((ssyl_in is 4)
  239.              (((NONE 0) (H- 0) (L- 0) (L-L% 0.682243) (L-H% 0.313084) (H-L% 0.0046729) L-L%))
  240.              ((syl_in is 6)
  241.               (((NONE 0) (H- 0) (L- 0.00649351) (L-L% 0.688312) (L-H% 0.298701) (H-L% 0.00649351) L-L%))
  242.               ((R:SylStructure.parent.R:Word.n.gpos is aux)
  243.                (((NONE 0) (H- 0) (L- 0) (L-L% 0.464286) (L-H% 0.535714) (H-L% 0) L-H%))
  244.                ((syl_in is 5)
  245.                 (((NONE 0) (H- 0) (L- 0) (L-L% 0.666667) (L-H% 0.322034) (H-L% 0.0112994) L-L%))
  246.                 ((sub_phrases is 2)
  247.                  (((NONE 0) (H- 0) (L- 0) (L-L% 0.696429) (L-H% 0.267857) (H-L% 0.0357143) L-L%))
  248.                  ((R:SylStructure.parent.R:Word.p.gpos is det)
  249.                   (((NONE 0) (H- 0) (L- 0) (L-L% 0.628866) (L-H% 0.350515) (H-L% 0.0206186) L-L%))
  250.                   ((sub_phrases is 0)
  251.                    ((R:SylStructure.parent.R:Word.n.gpos is in)
  252.                     ((n.old_syl_break is 0)
  253.                      (((NONE 0) (H- 0) (L- 0) (L-L% 0.68254) (L-H% 0.31746) (H-L% 0) L-L%))
  254.                      (((NONE 0) (H- 0.0147059) (L- 0) (L-L% 0.338235) (L-H% 0.632353) (H-L% 0.0147059) L-H%)))
  255.                     ((n.stress is 0)
  256.                      (((NONE 0) (H- 0) (L- 0.0108303) (L-L% 0.599278) (L-H% 0.32491) (H-L% 0.064982) L-L%))
  257.                      (((NONE 0) (H- 0) (L- 0) (L-L% 0.386364) (L-H% 0.579545) (H-L% 0.0340909) L-H%))))
  258.                    (((NONE 0) (H- 0) (L- 0.00456621) (L-L% 0.652968) (L-H% 0.324201) (H-L% 0.0182648) L-L%))))))))))))
  259.          ((R:SylStructure.parent.gpos is pps)
  260.           (((NONE 0.988764) (H- 0.011236) (L- 0) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  261.           ((syl_in is 0)
  262.            (((NONE 0.984848) (H- 0.0126263) (L- 0.00252525) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  263.            ((R:SylStructure.parent.gpos is content)
  264.             ((R:SylStructure.parent.R:Word.nn.gpos is 0)
  265.              (((NONE 0.967914) (H- 0.0106952) (L- 0.0213904) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  266.              ((pp.old_syl_break is 4)
  267.               (((NONE 0.972315) (H- 0.0232558) (L- 0.00442968) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  268.               ((syl_in is 1)
  269.                (((NONE 0.951163) (H- 0.0372093) (L- 0.0116279) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  270.                ((nn.old_syl_break is 4)
  271.                 (((NONE 0.956244) (H- 0.0127621) (L- 0.0291705) (L-L% 0) (L-H% 0) (H-L% 0.00182315) NONE))
  272.                 ((R:SylStructure.parent.R:Word.nn.gpos is in)
  273.                  (((NONE 0.941919) (H- 0.0378788) (L- 0.020202) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  274.                  ((R:SylStructure.parent.R:Word.p.gpos is cc)
  275.                   (((NONE 0.919643) (H- 0.0714286) (L- 0.00892857) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  276.                   ((nn.old_syl_break is 3)
  277.                    (((NONE 0.927273) (H- 0.0472727) (L- 0.0254545) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  278.                    ((R:SylStructure.parent.R:Word.nn.gpos is cc)
  279.                     (((NONE 0.921569) (H- 0.0588235) (L- 0.0196078) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  280.                     ((ssyl_in is 0)
  281.                      (((NONE 0.911591) (H- 0.0825147) (L- 0.00589391) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  282.                      ((R:SylStructure.parent.R:Word.nn.gpos is to)
  283.                       (((NONE 0.912281) (H- 0.0350877) (L- 0.0526316) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  284.                       ((R:SylStructure.parent.R:Word.pp.gpos is to)
  285.                        (((NONE 0.894737) (H- 0.0526316) (L- 0.0526316) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  286.                        ((R:SylStructure.parent.R:Word.p.gpos is in)
  287.                         (((NONE 0.888554) (H- 0.0662651) (L- 0.0451807) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  288.                         ((R:SylStructure.parent.R:Word.pp.gpos is in)
  289.                          (((NONE 0.875817) (H- 0.0718954) (L- 0.0522876) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  290.                          ((syl_in is 2)
  291.                           (((NONE 0.869942) (H- 0.0867052) (L- 0.0433526) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  292.                           ((R:SylStructure.parent.R:Word.nn.gpos is aux)
  293.                            (((NONE 0.854839) (H- 0.0967742) (L- 0.0483871) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  294.                            ((sub_phrases is 1)
  295.                             (((NONE 0.836538) (H- 0.0721154) (L- 0.0913462) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  296.                             ((R:SylStructure.parent.R:Word.pp.gpos is det)
  297.                              (((NONE 0.832402) (H- 0.0949721) (L- 0.0726257) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  298.                              ((ssyl_in is 4)
  299.                               (((NONE 0.793103) (H- 0.103448) (L- 0.103448) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  300.                               ((n.old_syl_break is 0)
  301.                                (((NONE 0.850816) (H- 0.0839161) (L- 0.0652681) (L-L% 0) (L-H% 0) (H-L% 0) NONE))
  302.                                ((R:SylStructure.parent.R:Word.n.gpos is content)
  303.                                 (((NONE 0.889447) (H- 0.0753769) (L- 0.0251256) (L-L% 0) (L-H% 0) (H-L% 0.0100503) NONE))
  304.                                 ((old_syl_break is 3)
  305.                                  (((NONE 0) (H- 0.609023) (L- 0.390977) (L-L% 0) (L-H% 0) (H-L% 0) H-))
  306.                                  (((NONE 1) (H- 0) (L- 0) (L-L% 0) (L-H% 0) (H-L% 0) NONE)))))))))))))))))))))))
  307.             (((NONE 0.978947) (H- 0.0131579) (L- 0.00789474) (L-L% 0) (L-H% 0) (H-L% 0) NONE)))))))))))))))
  308.  
  309. )
  310.  
  311. (defvar tobi_support_yn_questions t
  312.   "tobi_support_yn_questions
  313. If set a crude final rise will be added at utterance that are judged
  314. to be yesy/no questions.  Namely ending in a ? and not starting with
  315. a wh-for word.")
  316.  
  317. (define (first_word syl)
  318.   (let ((w (item.relation.parent syl 'SylStructure)))
  319.     (item.relation.first w 'Word)))
  320.  
  321. (define (syl_yn_question syl)
  322. "(syl_yn_question utt syl)
  323. Return 1 if this is the last syllable in a yes-no question.  Basically
  324. if it ends in question mark and doesn't start with a wh-woerd.  This
  325. isn't right but it depends on how much you want rising intonation."
  326.   (if (and 
  327.        tobi_support_yn_questions
  328.        (member_string (item.feat syl "syl_break") '("4" "3"))
  329.        (not (member_string 
  330.          (downcase (item.name (first_word syl)))
  331.          '("how" "why" "which" "who" "what" "where" "when")))
  332.        (string-matches 
  333.     (item.feat syl "R:SylStructure.parent.R:Token.parent.punc")
  334.                ".*\\?.*"))
  335.       "1"
  336.       "0"))
  337.  
  338. (provide 'tobi)
  339.