mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 09:14:32 +03:00
fix bug in EL predict (#4779)
This commit is contained in:
parent
bf611ebca7
commit
780d43aac7
|
@ -1302,7 +1302,7 @@ class EntityLinker(Pipe):
|
|||
if len(doc) > 0:
|
||||
# Looping through each sentence and each entity
|
||||
# This may go wrong if there are entities across sentences - because they might not get a KB ID
|
||||
for sent in doc.ents:
|
||||
for sent in doc.sents:
|
||||
sent_doc = sent.as_doc()
|
||||
# currently, the context is the same for each entity in a sentence (should be refined)
|
||||
sentence_encoding = self.model([sent_doc])[0]
|
||||
|
|
Loading…
Reference in New Issue
Block a user