1.1.1 • Published 1 year ago

ash-text-analyzer v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

TextAnalyzer

Small module which helps you return the most likely word that follows the one passed to the method. Supports different cultures and delimiters

Usage:

import { TextAnalyzer } from 'ash-text-analyzer';

const textAnalyzer = new TextAnalyzer('Text to predict next word');
textAnalyzer.predictNextWord('predict'); // next

Also there is second optional parameter which allows you to transfer which word is most popular to return (indexing from 0, where 0 is the most popular)

Example:

import { TextAnalyzer } from 'ash-text-analyzer';

const textAnalyzer = new TextAnalyzer('The test the most the test no');
textAnalyzer.predictNextWord("the") // test
textAnalyzer.predictNextWord("the", 1) // most
textAnalyzer.predictNextWord("the", 2) // null
textAnalyzer.predictNextWord("no") // null

If there is no such word, return null

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago