]> git.openstreetmap.org Git - nominatim.git/commitdiff
harmonize spelling
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 29 Jul 2022 08:52:01 +0000 (10:52 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 29 Jul 2022 08:52:01 +0000 (10:52 +0200)
Stick with the American spelling of Analyze.

nominatim/tokenizer/icu_rule_loader.py
nominatim/tokenizer/icu_token_analysis.py
nominatim/tokenizer/token_analysis/base.py

index aeb8a3234788b7169bb58e134ba3d53e199d53cb..4c36282ca54bfbd3526d24ead471a3e9fe9dbc33 100644 (file)
@@ -20,7 +20,7 @@ from nominatim.db.connection import Connection
 from nominatim.errors import UsageError
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
 from nominatim.tokenizer.icu_token_analysis import ICUTokenAnalysis
 from nominatim.errors import UsageError
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
 from nominatim.tokenizer.icu_token_analysis import ICUTokenAnalysis
-from nominatim.tokenizer.token_analysis.base import AnalysisModule, Analyser
+from nominatim.tokenizer.token_analysis.base import AnalysisModule, Analyzer
 import nominatim.data.country_info
 
 LOG = logging.getLogger()
 import nominatim.data.country_info
 
 LOG = logging.getLogger()
@@ -190,7 +190,7 @@ class TokenAnalyzerRule:
                                                    transliterator)
 
 
                                                    transliterator)
 
 
-    def create(self, normalizer: Any, transliterator: Any) -> Analyser:
+    def create(self, normalizer: Any, transliterator: Any) -> Analyzer:
         """ Create a new analyser instance for the given rule.
         """
         return self._analysis_mod.create(normalizer, transliterator, self.config)
         """ Create a new analyser instance for the given rule.
         """
         return self._analysis_mod.create(normalizer, transliterator, self.config)
index 3c4d729885450c5907283f9f7801f2df01296973..7ea31e8ea1eb21b20f3e8dd8b3c3f12cdc7cee83 100644 (file)
@@ -11,7 +11,7 @@ into a Nominatim token.
 from typing import Mapping, Optional, TYPE_CHECKING
 from icu import Transliterator
 
 from typing import Mapping, Optional, TYPE_CHECKING
 from icu import Transliterator
 
-from nominatim.tokenizer.token_analysis.base import Analyser
+from nominatim.tokenizer.token_analysis.base import Analyzer
 
 if TYPE_CHECKING:
     from typing import Any
 
 if TYPE_CHECKING:
     from typing import Any
@@ -19,7 +19,7 @@ if TYPE_CHECKING:
 
 class ICUTokenAnalysis:
     """ Container class collecting the transliterators and token analysis
 
 class ICUTokenAnalysis:
     """ Container class collecting the transliterators and token analysis
-        modules for a single NameAnalyser instance.
+        modules for a single Analyser instance.
     """
 
     def __init__(self, norm_rules: str, trans_rules: str,
     """
 
     def __init__(self, norm_rules: str, trans_rules: str,
@@ -36,7 +36,7 @@ class ICUTokenAnalysis:
                          for name, arules in analysis_rules.items()}
 
 
                          for name, arules in analysis_rules.items()}
 
 
-    def get_analyzer(self, name: Optional[str]) -> Analyser:
+    def get_analyzer(self, name: Optional[str]) -> Analyzer:
         """ Return the given named analyzer. If no analyzer with that
             name exists, return the default analyzer.
         """
         """ Return the given named analyzer. If no analyzer with that
             name exists, return the default analyzer.
         """
index d17a626c316c6b5581d79396c165ff094e7ca07e..cf6347b5e507ffaeb8c5f98a4dce17526b19c761 100644 (file)
@@ -11,7 +11,7 @@ from typing import Mapping, List, Any
 
 from nominatim.typing import Protocol
 
 
 from nominatim.typing import Protocol
 
-class Analyser(Protocol):
+class Analyzer(Protocol):
     """ The `create()` function of an analysis module needs to return an
         object that implements the following functions.
     """
     """ The `create()` function of an analysis module needs to return an
         object that implements the following functions.
     """
@@ -49,7 +49,7 @@ class AnalysisModule(Protocol):
                 used freely by the analysis module as needed.
         """
 
                 used freely by the analysis module as needed.
         """
 
-    def create(self, normalizer: Any, transliterator: Any, config: Any) -> Analyser:
+    def create(self, normalizer: Any, transliterator: Any, config: Any) -> Analyzer:
         """ Create a new instance of the analyser.
             A separate instance of the analyser is created for each thread
             when used in multi-threading context.
         """ Create a new instance of the analyser.
             A separate instance of the analyser is created for each thread
             when used in multi-threading context.
@@ -62,6 +62,6 @@ class AnalysisModule(Protocol):
                 config: The object that was returned by the call to configure().
 
             Returns:
                 config: The object that was returned by the call to configure().
 
             Returns:
-                A new analyzer instance. This must be a class that implements
-                the Analyser protocol.
+                A new analyzer instance. This must be an object that implements
+                the Analyzer protocol.
         """
         """