using BLSTM-CRF to solve ner, model is implemented using tensorflow.
- data_utils : create vocabulary, token words labels to ids, prepare train/validation/test datasets
- tfrecords_utils : save data to tensorflow tfrecord file, shuffle read data from tfrecord file
- model : define the inference, loss, accuracy
- train : train the model
- predict : predict the ner result with input sentence, evaluate the result with precision/recall/f score
- evaluate : evaluate the score of model predict, include precision, recall, f
- put data into raw-data directory
- run data_utils.py to create train/validation/test in datasets directory, note that change the value of vocab_size
- run tfrecords.py, note that change the value of num_steps
- train the datasets, run "CUDA_VISIBLE_DEVICES='0,1' python train.py", note that change the value of num_classes
- predict the data, run predict.py, note that change the value of prop_limit to increase precision score, dut this will decrease recall score
- evaluate the predict result, run evaluate.py