[prev in list] [next in list] [prev in thread] [next in thread] 

List:       festvox-talk
Subject:    Re: homograph disambiguation
From:       "Nickolay V. Shmyrev" <nshmyrev () yandex ! ru>
Date:       2009-11-18 12:30:25
Message-ID: 69011258547425 () webmail52 ! yandex ! ru
[Download RAW message or body]

Well, the reason is that scm file is out of sync with C code in festival/src/modules/Text/tok_ext.cc. The C code was changed to use
custom lisp function while lisp code remains the same. 

You need to apply the following code to revert tok_ext.cc

--- tok_ext.cc2004-09-30 17:04:18.000000000 +0400
+++ tok_ext.cc.new2009-11-18 15:20:56.000000000 +0300
@@ -56,7 +56,7 @@ static EST_Item *next_token(EST_TokenStr
    EST_Item *s);
 static void append_token(EST_Relation &ps, const EST_Token &s);
 static void output_find(const EST_String &filename,
-EST_Item *s,LISP v,LISP tfeats, FILE* fd);
+EST_Item *s,LISP tfeats, FILE* fd);
 
 LISP extract_tokens(LISP file, LISP tokens, LISP ofile)
 {
@@ -98,11 +98,9 @@ static void search_file(const EST_String
     for (s = next_token(ts,ps,s); s != 0; s=next_token(ts,ps,s))
     {
 for (l=tokens; l != NIL; l=cdr(l))
-//    if (s->name().matches(make_regex(get_c_string(car(car(l))))))
+if (s->name().matches(make_regex(get_c_string(car(car(l))))))
 {
-    v = leval(cons(car(car(l)),cons(siod(s),NIL)),NIL);
-    if (v != NIL)
-output_find(filename,s,v,car(l),ofd);
+output_find(filename,s,car(cdr(car(l))),ofd);
 }
     }
 
@@ -113,16 +111,18 @@ static void search_file(const EST_String
 }
 
 static void output_find(const EST_String &filename,
-EST_Item *s,LISP v,LISP tfeats, FILE* fd)
+EST_Item *s,LISP tfeats, FILE* fd)
 {
     // Found a match so output info
     LISP t;
     
-    fprintf(fd,"%s %s ",get_c_string(v),
+    fprintf(fd,"%s ",
     (const char *)filename);
-    for (t=cdr(tfeats); t != NIL; t=cdr(t))
+    for (t=cdr(tfeats); t != NIL; t=cdr(t)) {
+fprintf (stderr, "Dumping %s\n", get_c_string (car(t)));
 fprintf(fd,"%s ",(const char *)
 ffeature(s,get_c_string(car(t))).string());
+   }
     fprintf(fd,"\n");
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic