pelias-schema
Advanced tools
Comparing version 7.0.0 to 7.1.0
@@ -50,3 +50,4 @@ // validate analyzer is behaving as expected | ||
assertAnalysis( 'punctuation', 'Hawai‘i', ['hawaii'] ); | ||
assertAnalysis( 'punctuation - « in between', '«res»pub«lika»', ['respublika'] ); | ||
assertAnalysis( 'british_american_english', 'town theatre', ['0:town', '1:theatre', '1:theater'] ); | ||
@@ -53,0 +54,0 @@ assertAnalysis( 'british_american_english', 'town theater', ['0:town', '1:theater', '1:theatre'] ); |
{ | ||
"name": "pelias-schema", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"author": "pelias", | ||
@@ -5,0 +5,0 @@ "description": "Elasticsearch schema files and tooling for Pelias", |
// These characters will be removed from ngrams/shingles | ||
// @see: org/apache/lucene/analysis/cn/smart/stopwords.txt | ||
module.exports.all = [ | ||
".","`","‘","-","_","=","?","'","|","\"","(",")","{","}","[","]","<",">","*", | ||
"#","&","^","$","@","!","~",":",";","+","《","》","—","-",",","。", | ||
"、", ":",";","!","·","?","„","“","”",")","(","【","】","[","]","●" | ||
const all = [ | ||
".","`","‘","’","‛","-","_","=","?","'","|","\"","(",")","{","}","[","]","<",">","*", | ||
"#","&","^","$","@","!","~",":",";","+","《","》","—","-",",","。","‹","›","⹂","〝","〞", | ||
"、", ":",";","!","·","?","„","“","”","‟",")","(","【","】","[","]","●","«","»" | ||
]; | ||
module.exports.allowed = [ | ||
const allowed = [ | ||
"-", // allow hypens | ||
@@ -15,10 +15,5 @@ "&" // allow ampersands | ||
module.exports.blacklist = module.exports.all.slice(); | ||
// remove alowed chars from blacklist | ||
const blacklist = all.filter(s => !allowed.includes(s)); | ||
// remove alowed chars from blacklist | ||
module.exports.allowed.forEach(function(item){ | ||
var index = module.exports.blacklist.indexOf(item); | ||
if( index > -1 ){ | ||
module.exports.blacklist.splice(index, 1); | ||
} | ||
}); | ||
module.exports = { all, allowed, blacklist }; |
@@ -594,3 +594,3 @@ var path = require('path'), | ||
t.true(Array.isArray(char_filter.mappings)); | ||
t.equal(char_filter.mappings.length, 49); | ||
t.equal(char_filter.mappings.length, 59); | ||
t.end(); | ||
@@ -597,0 +597,0 @@ }); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
334750
8105