Commit cf2203a
committed
Add float list features in ItemSequence
- New class FloatFeatures defined in `pycrfsuite._float_features`
- Useful for adding word embedding features
- Wrap the word embedding list of float values with FloatFeatures class
- The api supports the existing extraction of features from nested
dicts.
- Added test case in `tests/test_itemsequence.py`
Example usage:
```
import pycrfsuite
from pycrfsuite._float_features import FloatFeatures as FF
seq = pycrfsuite.ItemSequence([
{"w2v": FF([1., 2., 3.])},
{"w2v": FF([-1., 5, 4.])}
])
```1 parent 720334f commit cf2203a
File tree
4 files changed
+2167
-1688
lines changed- pycrfsuite
- tests
4 files changed
+2167
-1688
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments