mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 07:07:24 +03:00
relax-parse: use cin.peek()
Hope this eliminates some weird behavior
This commit is contained in:
parent
eb5336ad9c
commit
19a5ef4a1a
@ -31,15 +31,15 @@ int main(int argc, char* argv[])
|
||||
|
||||
// loop through all sentences
|
||||
int i=0;
|
||||
string inBuffer;
|
||||
while(getline(cin, inBuffer)) {
|
||||
string inBufferString;
|
||||
while(cin.peek() != EOF) {
|
||||
getline(cin,inBufferString);
|
||||
i++;
|
||||
if (i%1000 == 0) cerr << "." << flush;
|
||||
if (i%10000 == 0) cerr << ":" << flush;
|
||||
if (i%100000 == 0) cerr << "!" << flush;
|
||||
|
||||
// process into syntax tree representation
|
||||
string inBufferString = string( inBuffer );
|
||||
set< string > labelCollection; // set of labels, not used
|
||||
map< string, int > topLabelCollection; // count of top labels, not used
|
||||
SyntaxTree tree;
|
||||
|
Loading…
Reference in New Issue
Block a user