In [3]:
import crfutils

from ner import feature_extractor, fields, separator

In [6]:
demo_file = open('demo.in', 'r')
out_file = open('output.txt', 'wb')

In [8]:
crfutils.main(feature_extractor, fields=fields, sep=separator,
              infile=demo_file, outfile=out_file)


Usage: -c [options]
This utility reads a data set from STDIN, and outputs attributes to STDOUT.
Each line of a data set must consist of field values separated by SEPARATOR
characters. The names and order of field values can be specified by -f option.
The separator character can be specified with -s option. Instead of outputting
attributes, this utility tags the input data when a model file is specified by
-t option (CRFsuite Python module must be installed).

-c: error: no such option: --IPKernelApp.parent_appname
An exception has occurred, use %tb to see the full traceback.

SystemExit: 2
To exit: use 'exit', 'quit', or Ctrl-D.