mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 12:20:20 +03:00
Convert argmax result to raw integer
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
This commit is contained in:
parent
9430306076
commit
95a4835342
|
@ -165,7 +165,7 @@ class EditTreeLemmatizer(TrainablePipe):
|
||||||
doc_compat_guesses = []
|
doc_compat_guesses = []
|
||||||
for i, token in enumerate(doc):
|
for i, token in enumerate(doc):
|
||||||
for _ in range(self.top_k):
|
for _ in range(self.top_k):
|
||||||
candidate = doc_scores[i].argmax()
|
candidate = int(doc_scores[i].argmax())
|
||||||
candidate_tree_id = self.cfg["labels"][candidate]
|
candidate_tree_id = self.cfg["labels"][candidate]
|
||||||
if self.trees.apply(candidate_tree_id, token.text) is not None:
|
if self.trees.apply(candidate_tree_id, token.text) is not None:
|
||||||
doc_compat_guesses.append(candidate_tree_id)
|
doc_compat_guesses.append(candidate_tree_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user