From 05ce59049a0bcb5e0c62056fef6567d2e41004b0 Mon Sep 17 00:00:00 2001 From: Damien Daspit Date: Fri, 13 Oct 2023 16:08:22 -0500 Subject: [PATCH] Fix crash attempting to reference EflomalAligner --- silnlp/alignment/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/silnlp/alignment/config.py b/silnlp/alignment/config.py index 55a74796..7855acd6 100644 --- a/silnlp/alignment/config.py +++ b/silnlp/alignment/config.py @@ -67,9 +67,10 @@ "clear3_fa": (ClearAligner, "Clear-3-FA"), "clear3_hmm": (ClearAligner, "Clear-3-HMM"), "clab_fast_align": (FastAlign, "clab-FastAlign"), - "eflomal": (EflomalAligner, "Eflomal"), } +if is_eflomal_available(): + ALIGNERS["eflomal"] = (EflomalAligner, "Eflomal") STEMMERS: Dict[str, Type[Stemmer]] = { "snowball": SnowballStemmer,