rguthrie3 / bilstm-crf Goto Github PK
View Code? Open in Web Editor NEWBiLSTM-CRF for sequence labeling in Dynet
BiLSTM-CRF for sequence labeling in Dynet
From https://github.com/rguthrie3/BiLSTM-CRF/blob/master/model.py#L114 it appears that transition[j][i] is the score for transitioning from tag i to tag j. However in https://github.com/rguthrie3/BiLSTM-CRF/blob/master/model.py#L52 the comment says the opposite. I guess it doesn't matter because the updates are still consistent, but should the comment change maybe?
Hey,
Just saw that you ported this as a tutorial for PyTorch http://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html#implementation-notes, and it looks great!
Now I'm curious about the snippet
"The implementation is not optimized. If you understand what is going on, you’ll probably quickly see that iterating over the next tag in the forward algorithm could probably be done in one big operation. I wanted to code to be more readable. If you want to make the relevant change, you could probably use this tagger for real tasks."
Seems like this implementation is the same, did you ever find a way to optimize it? Would save me the trouble, since I'm still very new to PyTorch (unfortunately, static models don't cut it for my use case at the moment …)
Hello!
thank you for sharing the code
can you please give me more explanation how to get Matrix that maps from Bi-LSTM output to num tags and Transition matrix for tagging layer
self.lstm_to_tags_params = self.model.add_parameters((tagset_size, hidden_dim))
self.transitions = self.model.add_lookup_parameters((tagset_size, tagset_size))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.