attardi / deepnl

Deep Learning for Natural Language Processing
GNU General Public License v3.0
457 stars 116 forks source link

Probability or score of named entities #15

Closed kiran-surya closed 8 years ago

kiran-surya commented 8 years ago

Hi,

Can we get the score / probability for named entity tagging ?

kiran-surya commented 8 years ago

Hi,

Any updates on this ?

attardi commented 8 years ago

Do you mean the score for each individual tag in the sequence? Take a look at method Tagger.tag() in tagger.pyx. It computes the scores for all tags for the whole sequence: scores = self._tag_sequence(seq) Then viterbi is applied to select the best path score, which determines which tags are returned. The resulting list of tags might not correspond to the tags with highest score at each point in the sequence, since viterbi optimizes the overall path score.

kiran-surya commented 8 years ago

thank you.