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
How to create features with duplicate keys ? #23
Comments
There are no duplicate features here: for example, in a first row |
In crfsuite document:
It mean |
Yes, 2 is weight, this is what I've written as well.. Could you please provide an example of a duplicate key? It seems I don't understand your question. |
Sample sequence:
{
w[-1]: a,
w[0]: man,
w[1]: eats,
w[2]: food
}
{
w[-3]|w[-2]|w[-1]: a,
w[1]|w[2]|w[3]: eats|some|foods,
}
{
w[-3...-1]: a,
w[1...3]: eats,
w[1...3]: some,
w[1...3]: foods
} And your package cant support |
See data format examples at http://python-crfsuite.readthedocs.io/en/latest/pycrfsuite.html#pycrfsuite.ItemSequence - the format you're using is just a shortcut:
All features have float values, both in crfsuite and python-crfsuite; So if you want such disjunctive features, pass |
Ok. I think that if i pass
-> How i use a list feature format with |
If all of your features have value 1.0, and you build feature names manually, you can pass a list: Please check data formats here: http://python-crfsuite.readthedocs.io/en/latest/pycrfsuite.html#pycrfsuite.ItemSequence |
Understood. Thank you. |
I see in (crfsuite document)[http://www.chokkan.org/software/crfsuite/manual.html] that key of feature can be duplicate:
How to create features with duplicate keys if i using sklearn-crfsuite ?
The text was updated successfully, but these errors were encountered: