From 945bd459ae05b543987e789ddca4f7b65621637a Mon Sep 17 00:00:00 2001 From: Taksh Date: Wed, 24 Jun 2026 20:52:20 +0530 Subject: [PATCH] fix: typo in CandidateGenerator error and which_look_like pattern (Fixes #601, #595) Correct 'constuctor' -> 'constructor' in the ValueError message and use hypernym instead of hyponym in the which_look_like Hearst pattern so the final noun phrase is tagged with the correct role. Co-authored-by: Cursor --- scispacy/candidate_generation.py | 2 +- scispacy/hearst_patterns.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scispacy/candidate_generation.py b/scispacy/candidate_generation.py index d4b42c06..6ff6190e 100644 --- a/scispacy/candidate_generation.py +++ b/scispacy/candidate_generation.py @@ -244,7 +244,7 @@ def __init__( [ann_index, tfidf_vectorizer, ann_concept_aliases_list, kb] ): raise ValueError( - "You cannot pass both a name argument and other constuctor arguments." + "You cannot pass both a name argument and other constructor arguments." ) # Set the name to the default, after we have checked diff --git a/scispacy/hearst_patterns.py b/scispacy/hearst_patterns.py index 992b7a43..c28b16a7 100644 --- a/scispacy/hearst_patterns.py +++ b/scispacy/hearst_patterns.py @@ -492,7 +492,7 @@ {"LEMMA": "which"}, {"LEMMA": "look"}, {"LEMMA": "like"}, - hyponym, + hypernym, ], "position": "last", },