jurafsky&martin_3rdEd_17 (1).pdf

Capitalization tag p suffix tag and so on into an hmm

Info icon This preview shows pages 158–160. Sign up to view the full content.

View Full Document Right Arrow Icon
capitalization | tag ) , P ( suffix | tag ) , and so on into an HMM-style model. But each time we add a feature we have to do a lot of complicated conditioning which gets harder and harder as we have more and more such features and, as we’ll see, there are lots more features we can add. Figure 10.12 shows a graphical intuition of some of these additional features. will MD VB Janet back the bill NNP <s> w i w i+1 w i-1 t i-1 t i-2 w i-1 Figure 10.12 An MEMM for part-of-speech tagging showing the ability to condition on more features. A basic MEMM part-of-speech tagger conditions on the observation word it- self, neighboring words, and previous tags, and various combinations, using feature templates like the following: templates h t i , w i - 2 i , h t i , w i - 1 i , h t i , w i i , h t i , w i + 1 i , h t i , w i + 2 i h t i , t i - 1 i , h t i , t i - 2 , t i - 1 i , h t i , t i - 1 , w i i , h t i , w i - 1 , w i ih t i , w i , w i + 1 i , (10.28)
Image of page 158

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10.5 M AXIMUM E NTROPY M ARKOV M ODELS 159 Recall from Chapter 7 that feature templates are used to automatically populate the set of features from every instance in the training and test set. Thus our exam- ple Janet/NNP will/MD back/VB the/DT bill/NN , when w i is the word back , would generate the following features: t i = VB and w i - 2 = Janet t i = VB and w i - 1 = will t i = VB and w i = back t i = VB and w i + 1 = the t i = VB and w i + 2 = bill t i = VB and t i - 1 = MD t i = VB and t i - 1 = MD and t i - 2 = NNP t i = VB and w i = back and w i + 1 = the Also necessary are features to deal with unknown words, expressing properties of the word’s spelling or shape: w i contains a particular prefix (from all prefixes of length 4) w i contains a particular suffix (from all suffixes of length 4) w i contains a number w i contains an upper-case letter w i contains a hyphen w i is all upper case w i ’s word shape w i ’s short word shape w i is upper case and has a digit and a dash (like CFC-12 ) w i is upper case and followed within 3 words by Co., Inc., etc. Word shape features are used to represent the abstract letter pattern of the word word shape by mapping lower-case letters to ‘x’, upper-case to ‘X’, numbers to ’d’, and retaining punctuation. Thus for example I.M.F would map to X.X.X. and DC10-30 would map to XXdd-dd. A second class of shorter word shape features is also used. In these features consecutive character types are removed, so DC10-30 would be mapped to Xd-d but I.M.F would still map to X.X.X. For example the word well-dressed would generate the following non-zero valued feature values: prefix( w i ) = w prefix( w i ) = we prefix( w i ) = wel prefix( w i ) = well suffix( w i ) = ssed suffix( w i ) = sed suffix( w i ) = ed suffix( w i ) = d has-hyphen( w i ) word-shape( w i ) = xxxx-xxxxxxx short-word-shape( w i ) = x-x Features for known words, like the templates in Eq. 10.28 , are computed for ev- ery word seen in the training set. The unknown word features can also be computed for all words in training, or only on rare training words whose frequency is below some threshold.
Image of page 159
Image of page 160
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern