In [1]:
from hmm_model import Hmm_model

In [2]:
h = Hmm_model("train.txt")

In [13]:
h.train()

In [12]:
h.tag_sentence("preacher near the mosque killed the terrorist man living next to Syrian border in Baghdad .")


             0     1    2       3       4    5          6     7       8   \
Words  preacher  near  the  mosque  killed  the  terrorist   man  living   
Tags       NOUN   ADP  DET    NOUN    VERB  DET        ADJ  NOUN    VERB   

         9    10      11      12   13       14     15  
Words  next   to  Syrian  border   in  Baghdad      .  
Tags    ADJ  ADP     ADJ    NOUN  ADP    PROPN  PUNCT  

In [ ]:
h.state_trans_prob

In [ ]:
h.prior_prob

In [ ]:
h.emission_prob