diff --git a/apertium/__init__.py b/apertium/__init__.py index 7d1d67f..5a87d10 100644 --- a/apertium/__init__.py +++ b/apertium/__init__.py @@ -7,7 +7,7 @@ import platform from typing import Dict, Tuple -from apertium.analysis import analyze, Analyzer # noqa: F401 +from apertium.analysis import analyze, analyse, Analyzer, Analyser # noqa: F401 from apertium.generation import generate, Generator # noqa: F401 from apertium.installer import install_module # noqa: F401 from apertium.mode_search import search_path diff --git a/apertium/analysis/__init__.py b/apertium/analysis/__init__.py index af0dc2c..f18775d 100644 --- a/apertium/analysis/__init__.py +++ b/apertium/analysis/__init__.py @@ -69,6 +69,7 @@ def analyze(self, in_text: str, formatting: str = 'txt') -> List[LexicalUnit]: self.analyzer_cmds[self.lang].insert(0, deformatter) result: str = execute_pipeline(in_text, self.analyzer_cmds[self.lang]) return self._postproc_text(result) + analyse = analyze def analyze(lang: str, in_text: str, formatting: str = 'txt') -> List[LexicalUnit]: @@ -83,3 +84,5 @@ def analyze(lang: str, in_text: str, formatting: str = 'txt') -> List[LexicalUni """ analyzer: Analyzer = Analyzer(lang) return analyzer.analyze(in_text, formatting) +analyse = analyze +Analyser = Analyzer