from nominatim.api.search.query import Phrase, QueryStruct
class AbstractQueryAnalyzer(ABC):
- """ Class for analysing incomming queries.
+ """ Class for analysing incoming queries.
Query analyzers are tied to the tokenizer used on import.
"""
"""
+ @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.
"""