summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md79
1 files changed, 79 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md b/bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md
new file mode 100644
index 00000000..7bf59e97
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/n-gram/readme.md
@@ -0,0 +1,79 @@
+# n-gram
+
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
+
+Get [n-grams][wiki] in JavaScript.
+
+## Installation
+
+[npm][]:
+
+```bash
+npm install n-gram
+```
+
+## Usage
+
+```js
+var nGram = require('n-gram')
+
+nGram.bigram('n-gram') // ['n-', '-g', 'gr', 'ra', 'am']
+nGram(2)('n-gram') // ['n-', '-g', 'gr', 'ra', 'am']
+
+nGram.trigram('n-gram') // ['n-g', '-gr', 'gra', 'ram']
+
+nGram(6)('n-gram') // ['n-gram']
+nGram(7)('n-gram') // []
+
+// Anything with a `.length` and `.slice` works: arrays too.
+nGram.bigram(['alpha', 'bravo', 'charlie']) // [['alpha', 'bravo'], ['bravo', 'charlie']]
+```
+
+## API
+
+### `nGram(n)`
+
+Factory returning a function that converts a given value to n-grams.
+
+Want padding? Use something like the following: `nGram(2)(' ' + value + ' ');`
+
+### `nGram.bigram(value)`
+
+Shortcut for `nGram(2)`.
+
+### `nGram.trigram(value)`
+
+Shortcut for `nGram(3)`.
+
+## License
+
+[MIT][license] © [Titus Wormer][author]
+
+<!-- Definitions -->
+
+[build-badge]: https://img.shields.io/travis/words/n-gram.svg
+
+[build]: https://travis-ci.org/words/n-gram
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/words/n-gram.svg
+
+[coverage]: https://codecov.io/github/words/n-gram
+
+[downloads-badge]: https://img.shields.io/npm/dm/n-gram.svg
+
+[downloads]: https://www.npmjs.com/package/n-gram
+
+[size-badge]: https://img.shields.io/bundlephobia/minzip/n-gram.svg
+
+[size]: https://bundlephobia.com/result?p=n-gram
+
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: license
+
+[author]: https://wooorm.com
+
+[wiki]: https://en.wikipedia.org/wiki/N-gram