Skip to content

A Recurrent Neural Network for classifying the grammaticality of English sentences

Notifications You must be signed in to change notification settings

ethanp/GrammarBrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

GrammarBrain

A Recurrent Neural Network for Classifying English Sentence Grammaticality

The Paper

Abstract

In the face of the numerous theoretical challenges in training a neural network to classify any given English sentence as being either grammatical or ungrammatical, we train and compare a few configurations of Recurrent Neural Networks on exactly that task. Sentences are encoded as sequences of vectors, each denoting one word’s part of speech. The resulting network is surprisingly effective at differentiating between grammatical and shuffled “word salad” sentences double the length of those on which it is trained.

The Code

Dependencies

Experimenting

Make sure dependencies and installation is correct

$ python GrammarBrain/brown_data/util/Experiments.py

Write your own experiment

Follow the example of GrammarBrain/brown_data/experiment_scripts/gen_error.py, which uses the dictionary from GrammarBrain/brown_data/util/Experiments.py

License

GrammarBrain can be downloaded, used, modified, etc., for any purpose.

About

A Recurrent Neural Network for classifying the grammaticality of English sentences

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published