Unsupervised HMM training in NLTK

后端 未结 2 576
借酒劲吻你
借酒劲吻你 2021-01-31 23:07

I am just trying to do very simple unsupervised HMM training in nltk.

Consider:

import nltk
trainer = nltk.tag.hmm.HiddenMarkovModelTrainer()
from nltk.c         


        
2条回答
  •  难免孤独
    2021-01-31 23:55

    I thought that this was this bug in NLTK:

    http://code.google.com/p/nltk/source/diff?spec=svn8791&r=8791&format=side&path=/trunk/nltk/nltk/tag/hmm.py

    http://code.google.com/p/nltk/issues/detail?id=681

    However the error message "A Uniform probability distribution must have at least one sample." is different from the one you get from the bug.

提交回复
热议问题