synonymizer

0.0.3 • Public • Published

Build Status

Synonymizer

Simple Synonymize Engine for Node.js Based on Solr/ElasticSearch Synonyms Format.

Installation

npm install synonymizer

Usage

synonyms.txt

APC,A.P.C,アー・ペー・セー,아페세
...

yourApp.js

var Synonymizer = require('synonymizer');
var synonymizer = new Synonymizer('./synonyms.txt');
var synonymizeWords = synonymizer.synonymize('アー・ペー・セー Jean');
console.log(synonymizeWords); //print 'APC Jean'

API

new Synonymizer(synonymFilePath)

Returns an new instance of Synonymizer.

synonymizer.synonymize(inputString)

  • inputString: The string for syonymize.

Returns string replaced by synonyms.

/synonymizer/

    Package Sidebar

    Install

    npm i synonymizer

    Weekly Downloads

    5

    Version

    0.0.3

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • mrnoname