Gibberish Classification Algorithm in JavaScript
This library is inspired by @ProgramFOX's GibberishClassifier.NET.
Check an example here.
First, run npm install gibberish-detector
.
For using the module, run:
var gibberish = require('gibberish-detector');
gibberish.detect('This sentence is totally valid.'); //<- returns 1
gibberish.detect('euzbfdhuifdgiuhdsiudvbdjibgdfijbfdsiuddsfhjibfsdifdhbfd'); //<- returns 70.3127178591856
Add the following script to your HTML: <script src="gibberish.min.js"></script>
, or <script src="//gtomitsuka.github.io/gibberish-detector.js/gibberish.min.js"></script>
gibberish.detect('This sentence is totally valid.'); //<- returns 1
gibberish.detect('euzbfdhuifdgiuhdsiudvbdjibgdfijbfdsiuddsfhjibfsdifdhbfd'); //<- returns 70.3127178591856
Returns a float between 1 and 100 with the likelihood the given string is gibberish.