mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-21 01:21:58 +03:00
Format.
This commit is contained in:
parent
9391de674b
commit
e83a988a42
|
@ -138,7 +138,9 @@ def get_candidates(kb: KnowledgeBase, mention: Span) -> Iterable[Candidate]:
|
|||
mention (Span): Entity mention.
|
||||
RETURNS (Iterable[Candidate]): Identified candidates for specified mention.
|
||||
"""
|
||||
cands_per_doc = next(get_candidates_v2(kb, iter([SpanGroup(mention.doc, spans=[mention])])))
|
||||
cands_per_doc = next(
|
||||
get_candidates_v2(kb, iter([SpanGroup(mention.doc, spans=[mention])]))
|
||||
)
|
||||
assert isinstance(cands_per_doc, list)
|
||||
return next(cands_per_doc[0])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user