diff --git a/integration/analyzer_peliasIndexOneEdgeGram.js b/integration/analyzer_peliasIndexOneEdgeGram.js index 297416df..1f7053be 100644 --- a/integration/analyzer_peliasIndexOneEdgeGram.js +++ b/integration/analyzer_peliasIndexOneEdgeGram.js @@ -48,7 +48,7 @@ module.exports.tests.analyze = function(test, common){ '1:a', '2:a', '2:ab', '3:a', '3:ab', '3:abc', - '4:a', '4:ab', '4:abc', '4:abcd', '4:abcde', '4:abcdef', + '4:a', '4:ab', '4:abc', '4:abcd', '4:abcde', '4:abcdef', '4:abcdefg', '4:abcdefgh', '4:abcdefghi', '4:abcdefghij' ] ); assertAnalysis( 'removeAllZeroNumericPrefix', '00001', ['1'] ); @@ -69,7 +69,7 @@ module.exports.tests.analyze = function(test, common){ // remove punctuation (handled by the char_filter) assertAnalysis('punctuation', punctuation.all.join(''), ['0:&', '0:a', '0:an', '0:and', '0:u', '0:un', '0:und'] ); assertAnalysis( 'punctuation', 'Hawai‘i', ['0:h', '0:ha', '0:haw', '0:hawa', '0:hawai', '0:hawaii'] ); - + assertAnalysis( 'punctuation', '„Tip Top”', ['0:t', '0:ti', '0:tip', '1:t', '1:to', '1:top'] ); // ensure that very large grams are created assertAnalysis( 'largeGrams', 'grolmanstrasse', [ '0:g', '0:gr', '0:gro', '0:grol', '0:grolm', '0:grolma', '0:grolman', '0:grolmans', diff --git a/punctuation.js b/punctuation.js index 0c9fd970..5c36452d 100644 --- a/punctuation.js +++ b/punctuation.js @@ -4,7 +4,7 @@ module.exports.all = [ ".","`","‘","-","_","=","?","'","|","\"","(",")","{","}","[","]","<",">","*", "#","&","^","$","@","!","~",":",";","+","《","》","—","-",",","。", - "、", ":",";","!","·","?","“","”",")","(","【","】","[","]","●" + "、", ":",";","!","·","?","„","“","”",")","(","【","】","[","]","●" ]; module.exports.allowed = [ diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index 6e58831e..be715c99 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -2313,6 +2313,7 @@ "!=>", "·=>", "?=>", + "„=>", "“=>", "”=>", ")=>", diff --git a/test/settings.js b/test/settings.js index 5e72dd16..b939441f 100644 --- a/test/settings.js +++ b/test/settings.js @@ -591,7 +591,7 @@ module.exports.tests.punctuationCharFilter = function(test, common) { var char_filter = s.analysis.char_filter.punctuation; t.equal(char_filter.type, 'mapping'); t.true(Array.isArray(char_filter.mappings)); - t.equal(char_filter.mappings.length, 48); + t.equal(char_filter.mappings.length, 49); t.end(); }); };