 |
Edinburgh Speech Tools
2.4-release
|
|
42 #include "EST_Token.h"
45 # define __STRINGIZE(X) #X
46 # define DATA __STRINGIZE(DATAC)
49 int main(
int argc,
char **argv)
54 int tokens, alices, quotes;
60 cerr << argv[0] <<
": wrong number of arguments\n";
66 fname = DATA
"/alice";
68 if (ts.
open(fname) == -1)
70 cerr << argv[0] <<
": can't open input file \"" << argv[1] <<
89 for (tokens=quotes=alices=0; !ts.
eof(); tokens++)
94 if (t.prepunctuation().
contains(
"\""))
98 printf(
"Input file contains:\n");
99 printf(
" %5d tokens\n",tokens);
100 printf(
" %5d tokens preceeded by double quotes\n",quotes);
101 printf(
" %5d occurrences of Alice\n",alices);
int contains(const char *s, int pos=-1) const
Does it contain this substring?
void set_PrePunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation
int open(const EST_String &filename)
open a \Ref{EST_TokenStream} for a file.
EST_TokenStream & get(EST_Token &t)
get next token in stream
void set_PunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation