mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-18 20:22:25 +03:00
Change mention limit to match reference implementations
This generall means fewer spans are considered, which makes individual steps in training faster but can make training take longer to find the good spans.
This commit is contained in:
parent
1d1679d431
commit
56803d3909
|
@ -237,8 +237,8 @@ def coarse_prune(
|
||||||
# calculate the doc length
|
# calculate the doc length
|
||||||
doclen = ends[-1] - starts[0]
|
doclen = ends[-1] - starts[0]
|
||||||
# XXX seems to make more sense to use menlen than doclen here?
|
# XXX seems to make more sense to use menlen than doclen here?
|
||||||
# mlimit = min(mention_limit, int(mention_limit_ratio * doclen))
|
# coref-hoi uses doclen (number of words).
|
||||||
mlimit = min(mention_limit, int(mention_limit_ratio * menlen))
|
mlimit = min(mention_limit, int(mention_limit_ratio * doclen))
|
||||||
# csel is a 1d integer list
|
# csel is a 1d integer list
|
||||||
csel = select_non_crossing_spans(tops, starts, ends, mlimit)
|
csel = select_non_crossing_spans(tops, starts, ends, mlimit)
|
||||||
# add the offset so these indices are absolute
|
# add the offset so these indices are absolute
|
||||||
|
|
Loading…
Reference in New Issue
Block a user