diff --git a/ir_axioms/axiom/argumentative.py b/ir_axioms/axiom/argumentative.py index ec1bcc3..2cbb632 100644 --- a/ir_axioms/axiom/argumentative.py +++ b/ir_axioms/axiom/argumentative.py @@ -141,6 +141,7 @@ def _sentence_length( document: RankedDocument, ) -> float: download_nltk_dependencies("punkt") + download_nltk_dependencies("punkt_tab") sentences = sent_tokenize(context.contents(document)) if len(sentences) == 0: return nan diff --git a/ir_axioms/modules/ranking.py b/ir_axioms/modules/ranking.py index d9bbf77..64afdea 100644 --- a/ir_axioms/modules/ranking.py +++ b/ir_axioms/modules/ranking.py @@ -47,13 +47,15 @@ def kwiksort( axiom, query, context, - vertices_left + vertices_left, + pivot_selection ) vertices_right = kwiksort( axiom, query, context, - vertices_right + vertices_right, + pivot_selection ) return [*vertices_left, pivot, *vertices_right] diff --git a/tests/unit/util.py b/tests/unit/util.py index 42f1dd0..556f5bf 100644 --- a/tests/unit/util.py +++ b/tests/unit/util.py @@ -17,6 +17,7 @@ class MemoryIndexContext(IndexContext): # noinspection PyMethodMayBeStatic def __post_init__(self): download_nltk_dependencies("punkt") + download_nltk_dependencies("punkt_tab") def __hash__(self): return reduce(