contributions/mobl/www/js/persistence.search.js
/**
   * Does extremely basic tokenizing of text. Also includes some basic stemming.
   */
Does extremely basic tokenizing of text. Also includes some basic stemming.
Does extremely basic tokenizing of text . Also includes some basic stemming .
function searchTokenizer(text) {
    var words = text.toLowerCase().split(/\W+/);
    var wordDict = {};
    for(var i = 0; i < words.length; i++) {
      var normalizedWord = normalizeWord(words[i]);
      if(normalizedWord) {
        var word = '_' + normalizedWord;
        if(word in wordDict) {
          wordDict[word]++;
        } else {
          wordDict[word] = 1;
        }
      }
    }
    return wordDict;
  }
function searchTokenizer ( text ) { var words = text . toLowerCase ( ) . split ( / \W+ / ) ; var wordDict = { } ; for ( var i = 0 ; i < words . length ; i ++ ) { var normalizedWord = normalizeWord ( words [ i ] ) ; if ( normalizedWord ) { var word = '_' + normalizedWord ; if ( word in wordDict ) { wordDict [ word ] ++ ; } else { wordDict [ word ] = 1 ; } } } return wordDict ; }
Does extremely basic tokenizing of text.
Does extremely basic tokenizing of text .
// Prefixing words with _ to also index Javascript keywords and special fiels like 'constructor' // Some extremely basic stemming