1.5.0 • Published 10 years ago
sclass v1.5.0
sClass
persistent (redis) implementation of statistical classification for node.js
The source is available for download from
GitHub.
You can also install using Node Package Manager (npm
):
npm install sclass
Parameters
- replace: replacement string (if you don't provide this metacharacter (\w) will be used)
- unique: set true to make sure that word list is unique
- sort: set ASC/DESC if you want results sorted
- minLength: minimum length of a valid word
- redis : redis client
- port : redis port
- host : redis hostname
- auth : redis password
Usage
var engine = new Classifier({
foreign: false,
unique: true,
minLength: 3
});
engine.learn("Scalability is the ability of a system, network, or process to handle a growing amount of work " +
"in a capable manner or its ability to be enlarged to accommodate that growth.", ['technology', 'scalability'], function () {
engine.analyse("What is scalability?", function (tags) {
console.log(tags);
});
});