X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2a94bfc703678eb1ee9aef55b3ae3610c9669aac..13e7398566909044348e57163cbd87a2095e8e80:/nominatim/tokenizer/base.py diff --git a/nominatim/tokenizer/base.py b/nominatim/tokenizer/base.py index 02bc312f..94fac1fc 100644 --- a/nominatim/tokenizer/base.py +++ b/nominatim/tokenizer/base.py @@ -205,6 +205,16 @@ class AbstractTokenizer(ABC): pass + @abstractmethod + def update_statistics(self) -> None: + """ Recompute any tokenizer statistics necessary for efficient lookup. + This function is meant to be called from time to time by the user + to improve performance. However, the tokenizer must not depend on + it to be called in order to work. + """ + pass + + @abstractmethod def name_analyzer(self) -> AbstractAnalyzer: """ Create a new analyzer for tokenizing names and queries