line counts

This commit is contained in:
Hieu Hoang 2015-12-15 14:43:55 +00:00
parent 72c0c585df
commit d7c41a255e
2 changed files with 6 additions and 1 deletions

View File

@ -54,8 +54,13 @@ void LexicalReordering::Load(System &system)
{
InputFileStream file(m_path);
string line;
size_t lineNum = 0;
while(getline(file, line)) {
if (++lineNum % 1000000 == 0) {
cerr << lineNum << " ";
}
std::vector<std::string> toks = TokenizeMultiCharSeparator(line, "|||");
assert(toks.size() == 3);
PhraseImpl *source = PhraseImpl::CreateFromString(system.systemPool, system.GetVocab(), system, toks[0]);

View File

@ -115,7 +115,7 @@ void PhraseTableMemory::Load(System &system)
InputFileStream strme(m_path);
string line;
while (getline(strme, line)) {
if (++lineNum % 100000) {
if (++lineNum % 1000000 == 0) {
cerr << lineNum << " ";
}
toks.clear();