Simple Synonymize Engine for Node.js Based on Solr/ElasticSearch Synonyms Format.
npm install synonymizer
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'
synonymFilePath
: The file path of solr format (see http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory)
Returns an new instance of Synonymizer.
inputString
: The string for syonymize.
Returns string replaced by synonyms.