Skip to content

cbasavaraj/lstm-crf-pytorch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSTM-CRF in PyTorch

A PyTorch implementation of bidirectional LSTM-CRF for sequence tagging, adapted from the PyTorch tutorial. It is a character-based model and supports CUDA and mini-batch training.

Usage

Training data should be formatted as below:

word/tag word/tag word/tag ...
word/tag word/tag word/tag ...
...

To prepare data:

python prepare.py training_data

To train:

python train.py model word_to_idx tag_to_idx training_data.csv num_epoch

To predict:

python predict.py model.epochN word_to_idx tag_to_idx test_data

About

LSTM-CRF in PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%