An open source neural network
We built a neural network to be able to classify the difficulty or “language level” of any given text — with a 95% accuracy. We then open sourced the code to make it available to other people, and it has been ranking as one of the four top results for “neural network php” in Google ever since it was first released (in 2007).
- Feed forward, multi-layer perceptron network
- Support for momentum learning
- Advanced mechanism to prevent overfitting
- Custom activation function
To determine the language reference level, the first thing that needs to be done is a statistical analysis of the text. This results in data about average word and sentence length, about how rare or common the words are that have been used, the use of compound sentences, etc.
These characteristics are then fed to a neural network. The neural network applies the knowledge it has obtained in an earlier phase (the “training phase”) to determine the text’s difficulty.
We chose to build this system with a neural network because no comprehensive knowledge exists on the relationship between our input characteristics and the corresponding output. The relationship does exist, but is hard to find – and even harder to describe in software. However, a neural network can find and describe such a relationship quite easily.
Existing neural networks available for PHP at the time (most notably FANN) were difficult to set up, so we built one ourselves.
The code is available on GitHub.
If you think this is cool (we do!), and you wonder if we can help you out with something complicated as well, then don’t hesitate to contact us!