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

Add float list features in ItemSequence #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 10, 2016

  1. 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.])}
    ])
    ```
    napsternxg committed Jun 10, 2016
    Configuration menu
    Copy the full SHA
    cf2203a View commit details
    Browse the repository at this point in the history