Thanks for your very well tutorial, Suppose the word like " I need 100 dollar to buy a iphone ..
.......What is the part-of-speech tags are abbreviation of 100 ?
Also like 2nd example :" My account is number is ABC123XT
What is the part-of-speech tags are abbreviation of ABC123XT ?
Can you please help me out how to implement on your code?
Also, can you please give node what is the execution steps ?
Traceback (most recent call last):
File "pos.py", line 315, in
main()
File "pos.py", line 277, in main
unigram_p, bigram_p, trigram_p, trigram_d = calc_ngram_probs(brown_tags, unigram_c, bigram_c, trigram_c)
File "pos.py", line 82, in calc_ngram_probs
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
File "pos.py", line 82, in
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
ValueError: math domain error
Thanks for your very well tutorial, Suppose the word like " I need 100 dollar to buy a iphone .. .......What is the part-of-speech tags are abbreviation of 100 ? Also like 2nd example :" My account is number is ABC123XT What is the part-of-speech tags are abbreviation of ABC123XT ?
Can you please help me out how to implement on your code?
Also, can you please give node what is the execution steps ?
I get error while running below model
(base) C:\Users\nbehera4\Desktop\AI\POS-Taggers\model>python pos.py
Traceback (most recent call last): File "pos.py", line 315, in
main()
File "pos.py", line 277, in main
unigram_p, bigram_p, trigram_p, trigram_d = calc_ngram_probs(brown_tags, unigram_c, bigram_c, trigram_c)
File "pos.py", line 82, in calc_ngram_probs
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
File "pos.py", line 82, in
unigram_p = {(a,): math.log(unigram_c[(a,)], 2) - math.log(unigram_total, 2) for a in unigram_c}
ValueError: math domain error