Skip to content

Commit

Permalink
fix: Declare required token annotation "is_hit" in main module
Browse files Browse the repository at this point in the history
  • Loading branch information
gremid committed Feb 21, 2025
1 parent e124586 commit af2b93c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions gdex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
_DEFAULT_RARE_CHARS = "0123456789')(-"

Span.set_extension("gdex", default=0.0)
Token.set_extension("is_hit", default=False)


@dataclass
Expand Down
2 changes: 0 additions & 2 deletions tests/test_gdex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import gdex

spacy.tokens.Token.set_extension("is_hit", default=False)

spacy_model_packages = {
"de_core_news_sm": (
"de-core-news-sm @ https://github.com/explosion/spacy-models/"
Expand Down

0 comments on commit af2b93c

Please sign in to comment.