mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-10 07:04:53 +03:00
Attempt to use registry correctly
This commit is contained in:
parent
91b111467b
commit
e303628205
|
@ -143,6 +143,11 @@ def get_candidate_mentions(
|
||||||
return (begins, ends)
|
return (begins, ends)
|
||||||
|
|
||||||
|
|
||||||
|
@registry.misc("spacy.CorefCandidateGenerator.v0")
|
||||||
|
def create_mention_generator() -> Callable:
|
||||||
|
return get_candidate_mentions
|
||||||
|
|
||||||
|
|
||||||
def select_non_crossing_spans(
|
def select_non_crossing_spans(
|
||||||
idxs: List[int], starts: List[int], ends: List[int], limit: int
|
idxs: List[int], starts: List[int], ends: List[int], limit: int
|
||||||
) -> List[int]:
|
) -> List[int]:
|
||||||
|
|
|
@ -31,7 +31,9 @@ max_span_width = 20
|
||||||
mention_limit = 3900
|
mention_limit = 3900
|
||||||
dropout = 0.3
|
dropout = 0.3
|
||||||
hidden = 1000
|
hidden = 1000
|
||||||
@get_mentions = "spacy.CorefCandidateGenerator.v0"
|
|
||||||
|
[model.get_mentions]
|
||||||
|
@misc = "spacy.CorefCandidateGenerator.v0"
|
||||||
|
|
||||||
[model.tok2vec]
|
[model.tok2vec]
|
||||||
@architectures = "spacy.Tok2Vec.v2"
|
@architectures = "spacy.Tok2Vec.v2"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user