Phonetisaurus  1.0
FST-based Grapheme-to-Phoneme conversion
Functions
util.cc File Reference
#include <include/util.h>

Go to the source code of this file.

Functions

string vec2str (vector< string > vec, string sep)
 
string itoas (int i)
 
vector< string > tokenize_utf8_string (string *utf8_string, string *delimiter)
 
vector< string > tokenize_entry (string *testword, string *sep, SymbolTable *syms)
 
vector< int > tokenize2ints (string *testword, string *sep, const SymbolTable *syms)
 
timespec get_time ()
 
timespec diff (timespec start, timespec end)
 
 DEFINE_bool (help, false,"show usage information")
 
void PhonetisaurusSetFlags (const char *usage, int *argc, char ***argv, bool remove_flags)
 
void LoadWordList (const std::string &filename, std::vector< std::string > *corpus)
 
void Split (const std::string &s, char delim, std::vector< std::string > &elems)
 

Function Documentation

DEFINE_bool ( help  ,
false  ,
"show usage information"   
)
timespec diff ( timespec  start,
timespec  end 
)

Definition at line 145 of file util.cc.

timespec get_time ( )

Definition at line 138 of file util.cc.

string itoas ( int  i)

Definition at line 44 of file util.cc.

void LoadWordList ( const std::string &  filename,
std::vector< std::string > *  corpus 
)

Definition at line 250 of file util.cc.

void PhonetisaurusSetFlags ( const char *  usage,
int *  argc,
char ***  argv,
bool  remove_flags 
)

Definition at line 158 of file util.cc.

void Split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)

Definition at line 268 of file util.cc.

vector<int> tokenize2ints ( string *  testword,
string *  sep,
const SymbolTable *  syms 
)

Definition at line 110 of file util.cc.

vector<string> tokenize_entry ( string *  testword,
string *  sep,
SymbolTable *  syms 
)

Definition at line 93 of file util.cc.

vector<string> tokenize_utf8_string ( string *  utf8_string,
string *  delimiter 
)

Definition at line 50 of file util.cc.

string vec2str ( vector< string >  vec,
string  sep 
)

Definition at line 34 of file util.cc.