Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float embeddings #1

Merged
merged 3 commits into from
Feb 5, 2021
Merged

Float embeddings #1

merged 3 commits into from
Feb 5, 2021

Conversation

ahegel
Copy link
Owner

@ahegel ahegel commented Feb 5, 2021

Merge changes suggested in PR

napsternxg and others added 3 commits June 10, 2016 17:01
- 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.])}
])
```
@ahegel ahegel merged commit 6ced2ed into master Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants