Skip to content

fix: constructor typo and misleading tfidf count variable name#625

Open
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/candidate-generation-typo-and-varname
Open

fix: constructor typo and misleading tfidf count variable name#625
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/candidate-generation-typo-and-varname

Conversation

@Chessing234

Copy link
Copy Markdown

Problem

Two small correctness/clarity issues in scispacy/candidate_generation.py:

  1. The CandidateGenerator error message reads "...other constuctor arguments."constuctor is a typo (fix: typo 'constuctor' → 'constructor' in CandidateGenerator error message #601).
  2. create_tfidf_ann_index() names the empty-vector count number_of_non_empty_tfidfs, but empty_tfidfs_boolean_flags == False selects the empty vectors. The printed message already treats it as the empty count, so only the variable name was wrong and misleading (fix: misleading variable name in create_tfidf_ann_index — number_of_non_empty_tfidfs counts empty vectors #593).

Fix

  • constuctorconstructor.
  • Rename number_of_non_empty_tfidfsnumber_of_empty_tfidfs (used in the print as well) and add a short comment clarifying the flag polarity.

No behavioral change. Fixes #601, fixes #593.

Made with Cursor

Fix 'constuctor' -> 'constructor' in the CandidateGenerator error
message (allenai#601) and rename number_of_non_empty_tfidfs to
number_of_empty_tfidfs, which is what it actually counts (allenai#593).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant