labelCount
label​Count:​*
computes a limit on the number of labels returned by the
from​Documents
stage.
The following label​Count:​*
stage types are available for use in analysis request JSONs:
-
label​Count:​fixed
-
An explicit limit that is document-count insensitive.
-
label​Count:​progressive
-
A limit that scales progressively with the number of documents.
-
label​Count:​unlimited
-
No limit.
label​Count:​reference
-
References a
label​Count:​*
component defined in the request or in the project's default components.
label​Count:​fixed
A fixed limit on the number of labels.
{
"type": "labelCount:fixed",
"value": 10000
}
value
The limit value, inclusive.
label​Count:​progressive
A limit that scales progressively with the number of documents.
{
"type": "labelCount:progressive",
"exponent": 0.75,
"max": "unlimited",
"min": 0,
"multiplier": 2
}
Lingo4G uses the following formula to compute the limit:
Where
- is the number of documents from which Lingo4G collects labels,
-
is the
min
property, -
is the
max
property, -
is the
multiplier
property, -
is the
exponent
property.
Intuitively, the formula above computes the label limit between the provided minimum and maximum values, but scaling it progressively with the number of documents. The following table shows a few example component values for an increasing number of documents.
N (documents) | multiplier = 2, exponent= 0.75 | multiplier = 4, exponent= 0.75 | multiplier = 2, exponent= 0.5 | multiplier = 4, exponent= 0.5 |
---|---|---|---|---|
100 | 63 | 126 | 20 | 40 |
500 | 211 | 422 | 44 | 89 |
1000 | 355 | 711 | 63 | 126 |
5000 | 1189 | 2378 | 141 | 282 |
10000 | 2000 | 4000 | 200 | 400 |
100000 | 11246 | 22493 | 632 | 1264 |
1000000 | 63245 | 126491 | 2000 | 4000 |
exponent
Smoothing exponent applied to the number of documents, see the formula.
max
The limit on the maximum number of labels, see the formula.
min
The limit on the minimum number of labels, see the formula.
multiplier
Smoothed document count multiplier, see the formula.
label​Count:​unlimited
This component specifies no limit on the number of labels.
{
"type": "labelCount:unlimited"
}
label​Count:​*
Consumers of
The following stages and components take label​Count:​*
as
input:
Stage or component | Property |
---|---|
labels:​from​Documents | max​Labels |