X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/efafa5271957fb54b356ec1c90e8613f14de40d4..4b12d52ef553a0b4990e8ea190037ec007cc231b:/nominatim/tokenizer/base.py diff --git a/nominatim/tokenizer/base.py b/nominatim/tokenizer/base.py index 980dc69e..70a54bfd 100644 --- a/nominatim/tokenizer/base.py +++ b/nominatim/tokenizer/base.py @@ -12,7 +12,7 @@ from abc import ABC, abstractmethod from typing import List, Tuple, Dict, Any from nominatim.config import Configuration -from nominatim.indexer.place_info import PlaceInfo +from nominatim.data.place_info import PlaceInfo # pylint: disable=unnecessary-pass @@ -209,6 +209,13 @@ class AbstractTokenizer(ABC): """ + @abstractmethod + def update_word_tokens(self) -> None: + """ Do house-keeping on the tokenizers internal data structures. + Remove unused word tokens, resort data etc. + """ + + @abstractmethod def name_analyzer(self) -> AbstractAnalyzer: """ Create a new analyzer for tokenizing names and queries