Skip to content

GH-3686: show actual dictionary name when custom dict is passed to EntityMentionLinker#3695

Open
haoyu-haoyu wants to merge 1 commit intoflairNLP:masterfrom
haoyu-haoyu:fix/entity-linker-dict-name
Open

GH-3686: show actual dictionary name when custom dict is passed to EntityMentionLinker#3695
haoyu-haoyu wants to merge 1 commit intoflairNLP:masterfrom
haoyu-haoyu:fix/entity-linker-dict-name

Conversation

@haoyu-haoyu
Copy link
Copy Markdown

When you pass a pre-built InMemoryEntityLinkingDictionary directly to EntityMentionLinker.build() via dictionary=, the log message prints Dictionary None because dictionary_name_or_path is never assigned in that code path.

This was a bit confusing when following Tutorial 4 — took me a while to figure out why predict() seemed to work but returned nothing.

The fix falls back to dictionary.database_name (which InMemoryEntityLinkingDictionary inherits from EntityLinkingDictionary) before defaulting to "custom".

Closes #3686

…ed to EntityMentionLinker

When a pre-built dictionary is passed directly via the dictionary= param,
dictionary_name_or_path is never assigned so the log message prints
"Dictionary None".  Fall back to dictionary.database_name (which
InMemoryEntityLinkingDictionary sets from the dataset_name arg).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: HUNFLAIR2_TUTORIAL_4_CUSTOMIZE_LINKING

1 participant