22
33[ ![ Build status] ( https://travis-ci.org/Hexagon/thinker-fts.svg )] ( https://travis-ci.org/Hexagon/thinker-fts ) [ ![ npm version] ( https://badge.fury.io/js/thinker-fts.svg )] ( https://badge.fury.io/js/thinker-fts )
44
5- Fast and extendible Node.js/Javascript full text search engine.
5+ Fast and extendible pure JavaScript full text search engine.
66
77## Features
88
99 * Highly optimized, will give a ranked resultset within 20 ms on a 5000 (average wikipedia sized) document dataset.
1010 * In-memory operation
1111 * Few external dependencies
12- * Natural language search
12+ * Natural language searchx
1313 * Partial matching
1414 * Expression correction / suggestions
1515 * Weighted ranker (configurable weights for each field, all-expression-match-factor, partial vs exact factor etc.)
16+ * Search modifiers (+ require, - exclude, "searchword" precise match - excepts wordprocessors)
1617 * Field preprocessors
1718 * HTML-Stripper
1819 * Word preprocessors
19- * Swedish stemmer with stemmer stop words
20- * Stop words
21- * Wordforms
22- * Stripper for multiple characters
20+ * [Stemmers](https://en.wikipedia.org/wiki/Stemming)
21+ * Swedish
22+ * English
23+ * [Stop words](https://en.wikipedia.org/wiki/Stop_words)
24+ * Word forms
25+ * [Soundex](https://en.wikipedia.org/wiki/Soundex)
26+ * Stripper for repeated characters
2327 * Allows saving/loading the index to/from disk, but for small datasets you can feed the index on-the-fly.
2428
2529
@@ -300,13 +304,19 @@ An optional feature of the stemmers is to supply a list of words that you don't
300304
301305Currently there is two stemmers available, swedish through a custom version of the Snowball algorithm, and english through the Porter algorithm.
302306
303- Example setting up thinker with standard ranker and english stemming
307+ Example setting up thinker with standard ranker, english stemming and some stemmer stopwords.
304308
305309``` javascript
306310var
307311 thinker = Thinker (),
308312 ranker = Thinker .rankers .standard (),
309- stemmer = Thinker .processors .stemmers .english ();
313+ stemmer = Thinker .processors .stemmers .english ({
314+ " stemmer" : true ,
315+ " stemming" : true ,
316+ " dontstemthiseither" : true ,
317+ " leonardo" : true ,
318+ " anders" , true
319+ });
310320
311321thinker .addWordProcessor (stemmer);
312322
322332 thinker = Thinker (),
323333 ranker = Thinker .rankers .standard (),
324334 stemmer = Thinker .processors .stemmers .swedish ({
325- " stemmer" : true ,
326- " stemming" : true ,
327- " dontstemthiseither" : true ,
335+ " berta" : true ,
336+ " jonas" : true ,
328337 " leonardo" : true ,
329338 " anders" , true
330339 });
@@ -334,6 +343,23 @@ thinker.addWordProcessor(stemmer);
334343thinker .ranker = ranker;
335344```
336345
346+ #### Soundex
347+
348+ Soundex preprocesses the words in such way that words that sounds alike matches each other.
349+
350+ Example setting up thinker with Soundex processing.
351+
352+ ``` javascript
353+ var
354+ thinker = Thinker (),
355+ ranker = Thinker .rankers .standard (),
356+ soundex = Thinker .processors .soundex ();
357+
358+ thinker .addWordProcessor (soundex);
359+
360+ thinker .ranker = ranker;
361+ ```
362+
337363
338364## Dependencies
339365
@@ -343,6 +369,8 @@ Note: Dependencies is installed automatically by npm
343369
344370 [ stemmer] ( https://github.com/wooorm/stemmer ) (https://github.com/wooorm/stemmer )
345371
372+ [ node-soundex] ( https://github.com/LouisT/node-soundex ) (https://github.com/LouisT/node-soundex )
373+
346374
347375## Development dependencies
348376
0 commit comments