#include #include #include #include #include "simconfig.h" char vector[256][PHO_FEATURES][6]; char ortho_vowels[]="aeiouwy"; #define MAX_ORTH 14 int ortho_features[MAX_ORTH+1][26]; void get_map(char pho,int index,char *txt,char *word) { char *s; s=vector[(unsigned char)pho][index]; if ((pho==' ') || (pho=='\t') || (pho==0)) { strcpy(txt,"0 "); return; } else if (s[0]==0) { fprintf(stderr,"can't find lookup for phoneme \"%c\"\"%d\" word %s\n",pho,pho,word); return; } strcpy(txt,s); } void print_it(char *word,char *orth,char *phoneme,float prob,int *sem) { int i,j,x; char txt[500]; int out[1000]; /* if (orth[MAX_ORTH-1] != '_') { fprintf(stderr,"rejecting %s\n",word); return; } */ printf("TAG Word: %s Pho: %s Ortho: %s\n",word,phoneme,orth); printf("PROB %f\n",prob); for(i=0;i 1.0) prob=1.0; print_it(word,orth,pho,prob,sem); gets(line); } return 0; }