Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukem512/pronounceable
Test a word for pronounceability
https://github.com/lukem512/pronounceable
grammar language
Last synced: about 8 hours ago
JSON representation
Test a word for pronounceability
- Host: GitHub
- URL: https://github.com/lukem512/pronounceable
- Owner: lukem512
- License: mit
- Created: 2016-04-03T14:37:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T14:31:28.000Z (over 2 years ago)
- Last Synced: 2024-11-11T08:43:40.530Z (9 days ago)
- Topics: grammar, language
- Language: JavaScript
- Size: 494 KB
- Stars: 30
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pronounceable
[![Build Status](https://travis-ci.org/lukem512/pronounceable.svg?branch=master)](https://travis-ci.org/lukem512/pronounceable) [![npm](https://img.shields.io/npm/l/pronounceable.svg)](https://www.npmjs.com/package/pronounceable) [![npm](https://img.shields.io/npm/v/pronounceable.svg)](https://www.npmjs.com/package/pronounceable) [![npm](https://img.shields.io/npm/dm/pronounceable.svg)](https://www.npmjs.com/package/pronounceable)
Pronounceable is a small module that allows you to test a word for pronounceability.
To use it, simply install via NPM and include it in your project file.
```
const pronounceable = require('pronounceable');
```Then, to test a word for pronounceability, use the `test` method.
```
console.log(pronounceable.test('samosa')); // true
console.log(pronounceable.test('xghsii')); // false
```You can also use the module to score a word on its pronounceability, using the `score` method. The higher the output value the more pronounceable the word.
```
console.log(pronounceable.score('peonies')); // 0.10176356810708122
console.log(pronounceable.score('sshh')); // 0.0008556941146173743
```To generate your own dataset use the `train` method.
```
pronounceable.train('dictionary.txt', function(probabilities) {
// The data set has been returned
console.log(probabilities);
});
```