diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-12-06 10:37:48 -0500 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-12-06 10:37:48 -0500 |
commit | e39742355186ebf59a369b2e5b369648047ca216 (patch) | |
tree | 68b3e852dd52a98fbbd46fab59a58ed094064c83 /decoder | |
parent | e09c8fc558a5138b7e67b8f8fc898f7d4003e0b9 (diff) |
Remove synutils.h
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ff_const_reorder.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/decoder/ff_const_reorder.cc b/decoder/ff_const_reorder.cc index c0269125..8da551c6 100644 --- a/decoder/ff_const_reorder.cc +++ b/decoder/ff_const_reorder.cc @@ -1,5 +1,6 @@ #include "ff_const_reorder.h" +#include "filelib.h" #include "stringlib.h" #include "hg.h" #include "sentence_metadata.h" @@ -383,13 +384,13 @@ struct SIndexMap { index_map_parse_2_input = NULL; return; } - STxtFileReader* reader = new STxtFileReader(index_map_file.c_str()); - char szLine[10001]; - szLine[0] = '\0'; - reader->fnReadNextLine(szLine, NULL); - delete reader; vector<string> terms; - SplitOnWhitespace(string(szLine), &terms); + { + ReadFile file(index_map_file); + string line; + assert(getline(*file.stream(), line)); + SplitOnWhitespace(line, &terms); + } index_map_input_2_parse = new short int[terms.size() + 1]; int ix = 0; |