0.0.3 • Published 9 years ago

csnlp v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

CSNLP - the clumsy NLP JS library!

CSNLP is a javascript library that provides common NLP features such as tokenization, stemming, computing distance and many others.

Usage

npm install csnlp

Require using node.js

var csnlp = require('csnlp')

API Docs

  • Whitespace Tokenizer - Takes a string and tokenizes it by whitespace. Returns an array of strings.
var tokens = csnlp.tokenizeWS(string);
  • Treebank Tokenizer - Takes a string and tokenizes it using the set of rules found here. Returns an array of strings.
var tokens = csnlp.tokenizeTB(string);
  • Minimum Edit Distance - Accepts two arrays or strings and measures the distance between the two. Returns an integer.

    The getEditDistance uses Damerau-Levenshtein Minimum Edit Distance algorithm by counting the number of the four operations: insertion, deletion, substitution and transposition.

var distance = csnlp.getEditDistance(a, b);
0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago