marekrei / sequence-labeler

Neural network sequence labeling model
252 stars 74 forks source link

Using model on new data #2

Closed Slyfest closed 7 years ago

Slyfest commented 7 years ago

Hello, @marekrei Great work! I’m trying to make use of bidirectional lstm for binary sequence labeling. Having trained your model on my data, i want to test it on separate sentence, presumably, not from the training set.

In other words, how to use trained model to get output for one sentence at a time?

marekrei commented 7 years ago

Hi @Slyfest ,

The code doesn't currently have an out-of-the-box functionality for saving an output file, just running and evaluating an experiment. I'll add that functionality in the next update. In the mean time, you could create it yourself either by integrating a saving functionality in process_batches() or creating a separate script that loads a saved model, processes a file and prints the results.

Slyfest commented 7 years ago

Thanks for your reply! I will work in this direction

marekrei commented 7 years ago

There is now a script for printing output for any input file.