1.0.7 • Published 5 years ago

@h9h/word-collect v1.0.7

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

word-collect

Simple Library to collect word-sets, optionally using stemming algorithms

MIT license npm version Codacy Badge XO code style

Usage

const { collectWords } = require('../src/collector')

const text = '...'

const result = collectWords('de', text)
console.log(result.getWordDistribution(3))

Example

Mephistopheles:

Ein Teil von jener Kraft, Die stets das Böse will und stets das Gute schafft.

Faust:

Was ist mit diesem Rätselwort gemeint?

Mephistopheles:

Ich bin der Geist, der stets verneint! Und das mit Recht; denn alles, was entsteht, Ist wert, daß es zugrunde geht; Drum besser wär's, daß nichts entstünde. So ist denn alles, was ihr Sünde, Zerstörung, kurz, das Böse nennt, Mein eigentliches Element.

Faust:

Du nennst dich einen Teil, und stehst doch ganz vor mir?

Result:

Array(1)
    Array(2)
        0 = "stets"  // Word
        1 = 3        // Count

@h9h/word-collect

word-collect module

Given a text, this modules offers methods to

  • break the text into words
  • removes stop-words (aka noise)
  • stemm those words (reduzing them to their base form)
  • and counting the occurrences of these stemms

The result is a distribution of the main words in this text, giving a quick overview what it's all about.

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago