5 ms·
Show HN: Grammar checker using deep learning
- jmugan 11y agoHi, I made Deep Grammar. I also wrote a blog post about it https://www.linkedin.com/pulse/deep-grammar-checking-using-learning-jonathan-mugan https://www.linkedin.com/pulse/deep-grammar-checking-using-l...
- infocollector 11y agoIs the code available for it by any chance?
- jmugan 11y agoI'd like to turn this into a product, so I don't want to release the code. I wrote it in Theano (Python).
- nl 11y agoNot the author, but I'm guessing it uses an implementation of "Grammar as a Foreign Language"[1]. TensorFlow has a tutorial that gets you most of the way[2]. Edit: playing a bit I don't think it is doing this. I think it's using Word2Vec style vectors to build similar sentences, and calculating the probability of each and maybe the edit-cost to change. [1] http://arxiv.org/abs/1412.7449 http://arxiv.org/abs/1412.7449 [2] https://www.tensorflow.org/versions/master/tutorials/seq2seq/index.html#what-next https://www.tensorflow.org/versions/master/tutorials/seq2seq...
- joe563323 11y agoI have very little exposure to machine learning so my question may not make sense. Machine Learning is based on statics that does not have strict rules where as Grammar is a set of strict rules. Does it make sense to evaluate the strict rules using statics ?
- jmugan 11y agoYeah, it doesn't use strict rules, or rules at all, that's the cool thing. It looks for sections of text that don't "sound right." This is where the deep learning comes in. It learns over sequences of vectors, where the vectors represent the words in the sentence.
- indubitably 11y agoGrammar isn't a set of strict rules.
- PeCaN 11y agoIt is in the formal sense, and in a practical sense too (if you have an impractical amount of rules, anyway ;). Strict rules doesn't necessarily mean the rules (productions) are context-free.
- phreeza 11y agoInteresting idea, but I tried some examples and got pretty nonsensical recommendations. For example, I tried: > Looks interesting, but doesn't seem to support finding wrong tenses. and got > Consider deleting tenses so that wrong tenses. becomes wrong..
- jmugan 11y agoYeah, that's a false positive. Those are pretty rare for Deep Grammar. What is more common is that it finds an error but the suggested correction is not what you would want. Although other times the suggestion is uncannily accurate. The recommendations themselves aren't the important thing, but rather that it flags an error when there is an error. You can find a quantitative evaluation here https://www.linkedin.com/pulse/deep-grammar-checking-using-learning-jonathan-mugan https://www.linkedin.com/pulse/deep-grammar-checking-using-l.... But yeah, I'm still working on making it better!