X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/dcfb228c9a0035d72de6c3a66f7f329e72cd960e..fed46240d5af3a2543e7cac930a862d6a0abde7b:/nominatim/api/search/query_analyzer_factory.py?ds=sidebyside diff --git a/nominatim/api/search/query_analyzer_factory.py b/nominatim/api/search/query_analyzer_factory.py index 35649d0f..bbc1eb6b 100644 --- a/nominatim/api/search/query_analyzer_factory.py +++ b/nominatim/api/search/query_analyzer_factory.py @@ -30,6 +30,15 @@ class AbstractQueryAnalyzer(ABC): """ + @abstractmethod + def normalize_text(self, text: str) -> str: + """ Bring the given text into a normalized form. That is the + standardized form search will work with. All information removed + at this stage is inevitably lost. + """ + + + async def make_query_analyzer(conn: SearchConnection) -> AbstractQueryAnalyzer: """ Create a query analyzer for the tokenizer used by the database. """