X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2635fe8b4caa16de25776a4f346997aaf69e61e4..e6775e713c2a1c009f7a01fad674a545e0e6bb39:/docs/develop/Tokenizers.md?ds=sidebyside diff --git a/docs/develop/Tokenizers.md b/docs/develop/Tokenizers.md index 28d8fd19..5fe4e38d 100644 --- a/docs/develop/Tokenizers.md +++ b/docs/develop/Tokenizers.md @@ -93,7 +93,7 @@ for a custom tokenizer implementation. Nominatim expects two files for a tokenizer: -* `nominiatim/tokenizer/_tokenizer.py` containing the Python part of the +* `nominatim/tokenizer/_tokenizer.py` containing the Python part of the implementation * `lib-php/tokenizer/_tokenizer.php` with the PHP part of the implementation @@ -245,11 +245,11 @@ Currently, tokenizers are encouraged to make sure that matching works against both the search token list and the match token list. ```sql -FUNCTION token_normalized_postcode(postcode TEXT) RETURNS TEXT +FUNCTION token_get_postcode(info JSONB) RETURNS TEXT ``` -Return the normalized version of the given postcode. This function must return -the same value as the Python function `AbstractAnalyzer->normalize_postcode()`. +Return the postcode for the object, if any exists. The postcode must be in +the form that should also be presented to the end-user. ```sql FUNCTION token_strip_info(info JSONB) RETURNS JSONB