mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 10:02:01 +03:00
Format.
This commit is contained in:
parent
38dce966e5
commit
5f40b3e523
|
@ -76,7 +76,7 @@ class InMemoryCandidate(Candidate):
|
|||
mention: str,
|
||||
entity_vector: List[float],
|
||||
prior_prob: float,
|
||||
entity_freq: int
|
||||
entity_freq: int,
|
||||
):
|
||||
"""
|
||||
hash_to_str (Callable[[int], str]): Callable retrieving entity name from provided entity/vocab hash.
|
||||
|
|
|
@ -63,7 +63,9 @@ def _check_kb(kb):
|
|||
assert alias_string not in kb.get_alias_strings()
|
||||
|
||||
# check candidates & probabilities
|
||||
candidates = sorted(kb._get_alias_candidates("double07"), key=lambda x: x.entity_id_str)
|
||||
candidates = sorted(
|
||||
kb._get_alias_candidates("double07"), key=lambda x: x.entity_id_str
|
||||
)
|
||||
assert len(candidates) == 2
|
||||
|
||||
assert candidates[0].entity_id_str == "Q007"
|
||||
|
|
Loading…
Reference in New Issue
Block a user