tokens: Putting the test at the top of the loop does n't work ; you need to test for failure ( not eof()) after input , before using the value read .
ner_tags: O O O O O O O O O O O O O O O O O O O O O B-Function O O O O O O O O O