Fixed some bugs in NamedEntityRecognizer