[SOLVED] CLC Project 4- POS Tagging

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

 

./viterbi.py input_hmm test_file output_file

I’m providing hmm.txt, which is in the following format (italics are replaced with values in the file):

state_num=number of states sym_num=number of POS tags

\init

tag P(tag | BOS) log10(P(tag | BOS))

…

\transition tag1 tag2 P(tag2 | tag1) log10(P(tag2 | tag1))

…

\emission tag word P(word | tag) log10(P(word | tag))

…

  • If there is no transition probability from tag1 to tag2, then it is impossible to go from tag1 to tag2.
  • If there is no transition probability from tag to word, then it is impossible for that tag to generate that word.

Each line of the test_file contains a single sentence.

The format of the output_file should be, one sentence per line: word1/tag1 word2/tag2 word3/tag3…

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.