diff --git a/classifier/HouseNumberClassifier.js b/classifier/HouseNumberClassifier.js index 68be29b3..46ee0b11 100644 --- a/classifier/HouseNumberClassifier.js +++ b/classifier/HouseNumberClassifier.js @@ -15,7 +15,8 @@ class HouseNumberClassifier extends WordClassifier { /^(\d{1,5})[a-zA-Z\u0400-\u04FF]?\/(\d{1,5})$/.test(span.body) || // 1/135 or 1b/135 Style /^(\d{1,5})([nsewNSEW])(\d{1,5})[a-zA-Z]?$/.test(span.body) || // 6N23 Style (ie Kane County, IL) /^([nsewNSEW])(\d{1,5})([nsewNSEW]\d{1,5})?$/.test(span.body) // W350N5337 or N453 Style (ie Waukesha County, WI) - // /^\d{1,5}(к\d{1,5})?(с\d{1,5})?$/.test(span.body) // Russian style including korpus (cyrillic к) and stroenie (cyrillic с) + /^(\d{1,5}) (\d\/\d)?$/.test(span.body) || // 3 1/4 Style (ie Immenstadt im Allgäu, Germany) + // /^\d{1,5}(к\d{1,5})?(с\d{1,5})?$/.test(span.body) // Russian style including korpus (cyrillic к) and stroenie (cyrillic с) ) { let confidence = 1 let prev = span.graph.findOne('prev') diff --git a/classifier/HouseNumberClassifier.test.js b/classifier/HouseNumberClassifier.test.js index 3e267b9b..8ad6bc6b 100644 --- a/classifier/HouseNumberClassifier.test.js +++ b/classifier/HouseNumberClassifier.test.js @@ -133,6 +133,24 @@ module.exports.tests.forward_slash = (test) => { }) } +module.exports.tests.fraction_appendix = (test) => { + test('Fraction: 1 3/4', (t) => { + let s = classify('1 3/4') + t.deepEqual(s.classifications, { HouseNumberClassification: new HouseNumberClassification(1.0) }) + t.end() + }) + test('Fraction: 25 2/2', (t) => { + let s = classify('25 2/2') + t.deepEqual(s.classifications, { HouseNumberClassification: new HouseNumberClassification(1.0) }) + t.end() + }) + test('Fraction: 11 1/3', (t) => { + let s = classify('11 1/3') + t.deepEqual(s.classifications, { HouseNumberClassification: new HouseNumberClassification(1.0) }) + t.end() + }) +} + module.exports.tests.misc = (test) => { test('misc: 6N23', (t) => { let s = classify('6N23') diff --git a/resources/pelias/dictionaries/libpostal/de/academic_degrees.txt b/resources/pelias/dictionaries/libpostal/de/academic_degrees.txt new file mode 100644 index 00000000..766a34e2 --- /dev/null +++ b/resources/pelias/dictionaries/libpostal/de/academic_degrees.txt @@ -0,0 +1,7 @@ +diplom ingenieur|dipl ing|dipl. ing.|dipl. ing +diplom kaufmann|dipl kfm|dipl. kfm.|dipl. kfm +doktor der medizin|dr med|dr. med. +doktor der philosophie|dr phil|dr. phil. +magister|mag|mag. +bachelor of science|b.sc|b sc.|bachelor Sc.|b sc|b. sc +master of science|m.sc|m sc.|master Sc.|m sc|m. sc \ No newline at end of file diff --git a/resources/pelias/dictionaries/libpostal/de/near.txt b/resources/pelias/dictionaries/libpostal/de/near.txt new file mode 100644 index 00000000..7f053486 --- /dev/null +++ b/resources/pelias/dictionaries/libpostal/de/near.txt @@ -0,0 +1,2 @@ +bei|b. +nähe|nahe|naehe|nahe gelegen \ No newline at end of file diff --git a/resources/pelias/dictionaries/libpostal/de/place_names.txt b/resources/pelias/dictionaries/libpostal/de/place_names.txt index 32b9a544..78eb7bc9 100644 --- a/resources/pelias/dictionaries/libpostal/de/place_names.txt +++ b/resources/pelias/dictionaries/libpostal/de/place_names.txt @@ -1 +1,11 @@ !ma +bahnhof|bf|b f +busbahnhof|bbf +casino|kasino +feuerwehr|fw +grundschule|gs|g s +hauptbahnhof|hbf|h b f +krankenhaus|kh|k h +nachtklub|nachtclub +polizei|pol +zahnarzt \ No newline at end of file diff --git a/resources/pelias/dictionaries/libpostal/de/stopwords.txt b/resources/pelias/dictionaries/libpostal/de/stopwords.txt new file mode 100644 index 00000000..08213e15 --- /dev/null +++ b/resources/pelias/dictionaries/libpostal/de/stopwords.txt @@ -0,0 +1,17 @@ +bei|b|b. +das|d|d. +dem|d|d. +den|d|d. +der|d|d. +des|d|d. +die|d|d. +fur|für|f. +gegenuber|gegenüber|ggü.|ggu|g g u|g g ü +mit|m. +nachst|nächst +uber|über +vor|v|v. +von|v|v. +zu|z|z. +zwischen|zw.|z w +zum|z|z. \ No newline at end of file