







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








FT
154 Chapter 5. Part-of-Speech Tagging function TBL( corpus ) returns transforms-queue INTIALIZE-WITH-MOST-LIKELY-TAGS( corpus ) until end condition is met do templates ← GENERATE-POTENTIAL-RELEVANT-TEMPLATES best-transform ← GET-BEST-TRANSFORM( corpus , templates ) APPLY-TRANSFORM( best-transform , corpus ) ENQUEUE( best-transform-rule , transforms-queue ) end return ( transforms-queue ) function GET-BEST-TRANSFORM( corpus , templates ) returns transform for each template in templates ( instance , score ) ← GET-BEST-INSTANCE( corpus , template ) if ( score > best-transform.score ) then best-transform ← ( instance , score ) return ( best-transform ) function GET-BEST-INSTANCE( corpus , template) returns transform
DRA best-Z ← ARGMAX t ( num-good-transforms (t) - num-bad-transforms if ( num-good-transforms ( best-Z ) - num-bad-transforms ( best-Z )
best-instance.score ) then
best.rule ← “Change tag from from-tag to to-tag if prev tag is b best.score ← num-good-transforms ( best-Z ) - num-bad-transform return ( best ) procedure APPLY-TRANSFORM( transform , corpus ) for pos ← from 1 to corpus-size do if ( current-tag ( pos )== best-rule-from ) && ( current-tag ( pos −1)== best-rule-prev )) current-tag ( pos ) ← best-rule-to Figure 5.21 The Brill (1995) TBL algorithm for learning to tag. GET BE have to change for transformation templates other than “Change tag from is Z”. we run it on the (hitherto unseen) test set to see its performance. of our data for training, and save 10% each for devtest and test. development test set distinct from the final test set? Because if w
T Section 5.7. Evaluation and Error Analysis 155
the test set would then be optimistic: it would underestimate the true error rate. The problem with having a fixed training set, devset, and test set is that in order to save lots of data for training, the test set might not be large enough to be representative. Thus a better approach would be to somehow use all our data both for training and ssvalidation test. How is this possible? The idea is to use crossvalidation. In crossvalidation, we randomly choose a training and test set division of our data, train our tagger, and then compute the error rate on the test set. Then we repeat with a different randomly selected training set and test set. We do this sampling process 10 times, and then average these 10 runs to get an average error rate. This is called 10-fold crossvalidation. 10-fold ssvalidation The only problem with cross-validation is that because all the data is used for test- ing, we need the whole corpus to be blind; we can’t examine any of the data to suggest
The representative put the chairs on the
The representative put the chairs on the P(NOUN|DET)