mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
cache translieration results
This commit is contained in:
@@ -3,6 +3,7 @@ Tokenizer implementing normalisation as used before Nominatim 4 but using
|
|||||||
libICU instead of the PostgreSQL module.
|
libICU instead of the PostgreSQL module.
|
||||||
"""
|
"""
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
import functools
|
||||||
import io
|
import io
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
@@ -232,6 +233,7 @@ class LegacyICUNameAnalyzer:
|
|||||||
"""
|
"""
|
||||||
return self.normalizer.transliterate(phrase)
|
return self.normalizer.transliterate(phrase)
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=1024)
|
||||||
def make_standard_word(self, name):
|
def make_standard_word(self, name):
|
||||||
""" Create the normalised version of the name.
|
""" Create the normalised version of the name.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user