move postcode matcher in a separate file

This commit is contained in:
Sarah Hoffmann
2022-06-06 23:37:04 +02:00
parent bf86b45178
commit 80ea13437d
5 changed files with 103 additions and 73 deletions

View File

@@ -607,7 +607,7 @@ class LegacyICUNameAnalyzer(AbstractAnalyzer):
def _add_postcode(self, item):
""" Make sure the normalized postcode is present in the word table.
"""
analyzer = self.token_analysis.get_analyzer('@postcode')
analyzer = self.token_analysis.analysis.get('@postcode')
if analyzer is None:
postcode_name = item.name.strip().upper()