spaCy - Util.compounding
This utility function will yield an infinite series of compounding values. Whenever the generator is called, a value is produced by multiplying the previous value by that compound rate.
Arguments
The table below explains its arguments −
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| start | int/float | It represents the first value. |
| stop | int/float | It represents the maximum value. |
| compound | int/float | It is the compounding factor. |
Example 1
An example of util.compounding() utility function is as follows −
import spacy sizes = spacy.util.compounding(5., 50., 5.5) next(sizes) == 5.
Output
True
Example 2
An another example of util.compounding() function is given below −
next(sizes) == 5. * 5.5
Output
True
Example 3
Here is one more example of util.compounding() function. However, here the output is False.
next(sizes) == 6.5 * 5.5
Output
False
spacy_util_get_data_path.htm
Advertisements