Nondeterministic Polynomial Munchies
Miss any of our Open RFC calls?Watch the recordings here! »

stringmatcher

1.1.4 • Public • Published

stringmatcher

This is a very small, and simple string matcher that scans for words or strings. Its inspired by the concept of machine learning.

Description

This version returns an array of matched words, or an empty array if none were found.

Example Usage

var string_matcher = require('stringmatcher');
var sm = new string_matcher()
console.log(sm.scan('hello there!')) // returns [] 
console.log(sm.add_word(['hello']) )// add method 
console.log(sm.scan('hello there!')) // returns ['hello'] 
console.log(sm.remove_word('hello')) // returns true if removed 

Install

npm i stringmatcher

DownloadsWeekly Downloads

0

Version

1.1.4

License

ISC

Last publish

Collaborators

  • avatar