Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leonelgalan/asdfjkl
Determines if text contains gibberish.
https://github.com/leonelgalan/asdfjkl
gibberish javascript lorem-ipsum npm-package
Last synced: 9 days ago
JSON representation
Determines if text contains gibberish.
- Host: GitHub
- URL: https://github.com/leonelgalan/asdfjkl
- Owner: leonelgalan
- Created: 2017-11-01T16:53:47.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T18:26:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T14:05:04.923Z (27 days ago)
- Topics: gibberish, javascript, lorem-ipsum, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/asdfjkl
- Size: 2.43 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# asdfjkl
[![Node CI](https://github.com/leonelgalan/asdfjkl/actions/workflows/nodejs.yml/badge.svg)](https://github.com/leonelgalan/asdfjkl/actions/workflows/nodejs.yml)
[![npm Version](https://badge.fury.io/js/asdfjkl.svg)](http://badge.fury.io/js/asdfjkl)Determines if text contains gibberish. Based on Rob Neuhaus's [Gibberish-Detector](https://github.com/rrenaud/Gibberish-Detector) (Python), inspired in the [PHP](https://github.com/buggedcom/Gibberish-Detector-PHP) and [Ruby](https://github.com/mchitten/gibberish_detector) ports.
## How it works
The build-in model is built by feeding "The Adventures of Sherlock Holmes" (_data/big.txt_) into the cli: `asdfjkl --train`. The resulting model stores the probability of transitioning from each character to other character. This is later used to determine if the text being tested has similar transitions or not. A better explanation can be found in the original author's [README - Hot it works](https://github.com/rrenaud/Gibberish-Detector#how-it-works)
## Usage
```js
import asdfjkl from 'asdfjkl';asdfjkl('asdfjkl');
// true
asdfjkl('Hello World!');
// false
```