<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="143"/><title>Training a Perceptron with Global and Local Features for Chinese Word Segmentation</title><pubinfo>Sixth SIGHAN Workshop on Chinese Language Processing</pubinfo><author surname="Song" givenname="Dong"><org  name="Simon Fraser University" country="Canada" city="Burnaby"/></author><author surname="Sarkar" givenname="Anoop"><org  name="Simon Fraser University" country="Canada" city="Burnaby"/></author></firstpageheader><frontmatter><p><b>Training a Perceptron with Global and Local Features for Chinese Word Segmentation</b></p><p><b>Dong Song </b>and <b>Anoop Sarkar</b></p><p>School of Computing Science, Simon Fraser University Burnaby, BC, Canada V5A1S6</p><p>{dsong,anoop}@cs.sfu.ca</p></frontmatter><abstract>This paper proposes the use of global fea­tures for Chinese word segmentation. These global features are combined with local fea­tures using the averaged perceptron algo­rithm over N-best candidate word segmenta­tions. The N-best candidates are produced using a conditional random field (CRF) character-based tagger for word segmenta­tion. Our experiments show that by adding global features, performance is significantly improved compared to the character-based CRF tagger. Performance is also improved compared to using only local features. Our system obtains an F-score of 0.9355 on the CityU corpus, 0.9263 on the CKIP corpus, 0.9512 on the SXU corpus, 0.9296 on the NCC corpus and 0.9501 on the CTB cor­pus. All results are for the closed track in the fourth SIGHAN Chinese Word Segmen­tation Bakeoff. </abstract></header><body><section number="1" title="Introduction"><p>Most natural language processing tasks require that the input be tokenized into individual words. For some languages, including Chinese, this is challeng­ing since the sentence is typically written as a string of characters without spaces between words. Word segmentation is the task of recovering the most plau­sible grouping of characters into words. In this pa­per, we describe the system we developed for the fourth SIGHAN Chinese Word Segmentation Bake-off<footnote anchor="1"/>. We test our system in the closed track<footnote anchor="2"/> for all five corpora: Academia Sinica (CKIP), City Uni­versity of Hong Kong (CityU), National Chinese</p><footnote label="1">Further details at: www.china-language.gov.cn/bakeoff08/ bakeoff-08_basic.html</footnote><footnote label="2">We do not use any extra annotation, especially for punctu­ation, dates, numbers or English letters.</footnote><p>Corpus (NCC), University of Colorado (CTB), and</p><p>Shanxi University (SXU). <b>2   System Description</b></p><p>The architecture of our system is shown in Figure 1. For each of the training corpora in the bakeoff, we produce a 10-fold split: in each fold, 90% of the cor­pus is used for training and 10% is used to produce an N-best list of candidates. The N-best list is pro­duced using a character-based conditional random field (CRF) (Lafferty et al., 2001; Kudo et al., 2004) tagger. The true segmentation can now be compared with the N-best list in order to train an averaged per-ceptron algorithm (Collins, 2002a). This system is then used to predict the best word segmentation from an N-best list for each sentence in the test data.</p><p>Training Corpus (10-Fold Split)</p><p>Conditional Random</p><doubt alpha="100.0" length="5" tooSmall="False" monospace="0.0">Field</doubt><p>Local Features  / / N-best Candidates</p><p>Training With Average Perceptron</p><p>Global Features Input Sentence</p><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">7</doubt><p>Weight Vector</p><p>Decoding With Average Perceptron</p><p>N-best Candidates ,</p><doubt alpha="100.0" length="6" tooSmall="False" monospace="0.0">Output</doubt><figure caption="Figure 1: Outline of the segmentation process"></figure><subsection number="2.1" title="Learning Algorithm"><p>Given an unsegmented sentence x, the word seg­mentation problem can be defined as finding the most probable segmentation <i>F</i>(x) from a set of pos­sible segmentations of x.<page local="2" global="144"/></p><doubt alpha="40.7" length="27" tooSmall="False" monospace="0.0">F(x) = argmax $(x, y)• w(1)</doubt><p><i>y</i><i>e</i><i>GEN(x)</i></p><p>The set of possible segmentations is given by <i>GEN(x) </i>and the naive method is to first generate all possible segmented candidates. For a long sentence, generating those candidates and picking the one with the highest score is time consuming.</p><p>In our approach, N-best candidates for each train­ing example are produced with the <i>CRF++ </i>soft­ware (Kudo et al., 2004). The CRF is used as a tag­ger that tags each character with the following tags: for each multi-character word, its first character is given a <b>B </b>(Beginning) tag , its last character is as­signed an <b>E </b>(End) tag, while each of its remaining characters is provided an <b>M </b>(Middle) tag. In addi­tion, for a single-character word, <b>S </b>(Single) is used as its tag<footnote anchor="3"/>. Let c0 be the current character, c_i, c_2are the two preceding characters, and <i>c1,c2 </i>are the two characters to the right. Using this notation, the features used in our CRF models are: c0, <i>c_1, c1, </i>c_2, c2, c_ico, coci, c_ici, c_2c_i and coc2.</p><p>We use the now standard method for producing N-best candidates in order to train our re-ranker which uses global and local features: 10-folds of training data are used to train the tagger on 90% of the data and then produce N-best lists for the remaining 10%. This process gives us an N-best candidate list for each sentence and the candidate that is most similar to the true segmentation, called <i>yb. </i>We map a seg­mentation y to <i>features </i>associated with the segmen­tation using the mapping $(•). The score of a seg­mentation y is provided by the dot-product $(y) • w. The perceptron algorithm (Fig. 2) finds the weight parameter vector w using online updates. The pre­dicted segmentation <i>yi </i>based on the current weight vector is compared to the the best candidate yb, and whenever there is a mismatch, the algorithm updates the parameter vector by incrementing the parame­ter value for features in yb, and by decrementing the value for features in yi.</p><p>The voted perceptron (Freund and Schapire, 1999) has considerable advantages over the standard <b>Initialization:</b><b> </b>Set W = 0 <b>Algorithm:</b><b></b></p><doubt alpha="61.0" length="41" tooSmall="False" monospace="0.0">Inputs:Training Data ((xby^,...,(xm, ym))</doubt><doubt alpha="33.3" length="21" tooSmall="False" monospace="0.0">fort = 1, . . . , Tdo</doubt><doubt alpha="57.5" length="40" tooSmall="False" monospace="0.0">fori = 1 , . . . , mdoCalculateyi, where</doubt><doubt alpha="37.0" length="27" tooSmall="False" monospace="0.0">yi=     argmax     $(y) ■ W</doubt><p><i>ydN-best Candidates</i></p><doubt alpha="58.9" length="56" tooSmall="False" monospace="0.0">ifyj=ybthen ^W = W + $(yb) - $(yj)end if end for end for</doubt><figure caption="Figure 2: Training using a perceptron algorithm over N-best candidates."></figure><p>perceptron. However, due to the computational is­sues with the voted perceptron, the averaged per-ceptron algorithm (Collins, 2002a) is used instead. Rather than using W, we use the averaged weight parameter Y over the m training examples for future predictions on unseen data:</p><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">7 =</doubt><doubt alpha="50.0" length="2" tooSmall="False" monospace="0.0">—y</doubt><doubt alpha="33.3" length="12" tooSmall="False" monospace="0.0">i=1..mt=1..T</doubt><doubt alpha="75.0" length="4" tooSmall="False" monospace="0.0">Wi't</doubt><footnote label="3">Note that performance of the CRF tagger could be im­proved with the use of other tagsets. However, this does not affect our comparative experiments in this paper.</footnote><p>In calculating 7, an accumulating parameter vec­tor <i>ai't </i>is maintained and updated using w for each training example; therefore, <i>ai't = wi't. </i>After the last iteration, <i>ai't/mT </i>produces the final para­meter vector 7.</p><p>When the number of features is large, it is time consuming to calculate the total parameter <i>ai't </i>for each training example. To reduce the time complex­ity, we adapted the lazy update proposed in (Collins, 2002b), which was also used in (Zhang and Clark, 2007). After processing each training sentence, not all dimensions of <i>ai't </i>are updated. Instead, an up­date vector t is used to store the exact location (i, t) where each dimension of the averaged parameter vector was last updated, and only those dimensions corresponding to features appearing in the current sentence are updated. While for the last example in the last iteration, each dimension of t is updated, no matter whether the candidate output is correct.</p></subsection><subsection number="2.2" title="Feature Templates"><p>The feature templates used in our system include both local features and global features. For local fea­tures, we consider two major categories: word-based features and character-based features.<page local="3" global="145"/> Five specific types of features from (Zhang and Clark, 2007) that are shown in Table 1 were used in our system. In our initial experiments, the other features used in (Zhang and Clark, 2007) did not improve performance and so we do not include them in our system.</p><p>Table 1: local feature templates. Rows 1, 2 and 3 are word-based and rows 4 and 5 are character-based features</p><p>In our system, we also used two types of global features per sentence (see Table 2). By global, we mean features over the entire segmented sentence.<footnote anchor="4"/></p></subsection></section><section number="6" title="sentence confidence score"></section><section number="7" title="sentence language model score"><table caption="Table 2: global feature template"></table><p>The sentence confidence score is calculated by <i>CRF++ </i>during the production of the N-best candi­date list, and it measures how confident each candi­date is close to the true segmentation.</p><p>The sentence language model score for each seg­mentation candidate is produced using the SRIL M toolkit (Stolcke, 2002) normalized using the formula <i>Pi/L, </i>where <i>P </i>is the probability-based language model score and L is the length of the sentence in words (not in characters). For global features, the feature weights are not learned using the perceptron algorithm but are determined using a development set.</p></section><section number="3" title="Experiments and Analysis"><p>Our system is tested on all five corpora provided in the fourth SIGHAN Bakeoff, in the closed track.</p><subsection number="3.1" title="Parameter Pruning"><p>First, the value of the parameter N, which is the maximum number of N-best candidates, was deter­mined. An oracle procedure proceeds as follows: 80% of the training corpus is used to train the CRF model, and produce N-best outputs for each sen­tence on the remaining 20% of the data. Then these N candidates are compared with the true segmen­tation, and for each training sentence, the candidate closest to the truth is chosen as the final output. Test­ing on different values of N, we chose N to be 20 in all our experiments since that provided the best tradeoff between accuracy and speed.</p><footnote label="4">It is important to distinguish this kind of global feature from another type of 'global' feature that either enforces con­sistency or examines the use of a feature in the entire training or testing corpus.</footnote><p>Next, the weight for sentence confidence score <i>S</i><i>crf </i>and that for language model score Slm are de­termined. To simplify the process, we assume that the weights for both <i>S</i><i>crf </i>and Slm are equal. In this step, each training corpus is separated into a train­ing set (80% of the whole corpus) and a held-out set (20% of the corpus). Then, the perceptron algo­rithm is applied on the training set with different S<i>crf </i>and Slm values, and for various number of iterations. The weight values we test include 2, 4, 6, 8, 10, 20, 30, 40, 50, 100 and 200. From the experiments, the weights are chosen to be 100 for CKIP corpus, 10 for CityU corpus, 30 for NCC corpus, 20 for CTB corpus, and 10 for SXU corpus.</p><p>While determining the weights for global fea­tures, the number of training iterations can be deter­mined as well. Experiments show that, as the num­ber of iterations increases, the accuracy stabilizes in most cases, reflecting the convergence of the learn­ing algorithm. Analyzing the learning curves, we fix the number of training iterations to be 5 for CKIP corpus, 9 for NCC corpus, and 8 for the CityU, CTB and SXU corpora.</p></subsection><subsection number="3.2" title="Results on the Fourth SIGHAN Bakeoff"><p>In each experiment, F-score (F) is used to evalu­ate the segmentation accuracy. Table 3 shows the F-score on the fourth SIGHAN Bakeoff corpora. In this table, we record the performance of our system, the score from the character-based CRF method and the score from the averaged perceptron using only local features.</p><p>Our system outperforms the baseline character-based CRF tagger. In addition, the use of global features in the re-ranker produces better results than only using local features.</p><p>The only data set on which the performance of our system is lower than the character-based CRF method is CKIP corpus. For this data set during the parameter pruning step, the weight for Scr/ and S1m was too large.<page local="4" global="146"/> By lowering the weight from 100 to 4, we obtains an F-score of 0.9354, which is signifi­cantly better than the baseline CRF tagger.</p><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p></td><td class="cell"><p>word w</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>2</p></td><td class="cell"><p>word bigram wiw2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>3</p></td><td class="cell"><p>single character word w</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>4</p></td><td class="cell"><p>space-separated characters ci and c2</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>5</p></td><td class="cell"><p>character bi-gram cic2 in any word</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>The significance values in Table 3 were produced using the McNemar's Test (Gillick, 1989)<footnote anchor="5"/>. All our results are significantly better.</p></subsection></section><section number="4" title="Related Work"><p>Re-ranking over N-best lists has been applied to so many tasks in natural language that it is not possi­ble to list them all here. Closest to our approach is the work in (Kazama and Torisawa, 2007). They proposed a margin perceptron approach for named entity recognition with non-local features on an N-best list. In contrast to their approach, in our sys­tem, global features examine the entire sentence in­stead of partial phrases. For word segmentation, (Wang and Shi, 2006) implemented a re-ranking method with POS tagging features. In their ap­proach, character-based CRF model produces the N-best list for each test sentence. The Penn Chinese TreeBank is used to train a POS tagger, which is used in re-ranking. However the POS tags are used as local and not global features. Note that we would not use POS tags in the closed track.</p></section><section number="5" title="Conclusion"><p>We have participated in the closed track of the fourth SIGHAN Chinese word segmentation bakeoff, and we provide results on all five corpora. We have shown that by combining global and local features, we can improve accuracy over simply using local features, and we also show improved accuracy over the baseline CRF character-based tagger for word segmentation.</p><footnote label="5">www.fon.hum.uva.nl/Service/Statistics/McNemars _test.html</footnote><table caption="Table 3: F-scores on the Fourth SIGHAN Bakeoff Corpora" class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>CKIP</p></td><td class="cell"><p>NCC</p></td><td class="cell"><p>CityU</p></td><td class="cell"><p>CTB</p></td><td class="cell"><p>SXU</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Character-based CRF method</p></td><td class="cell"><p>0.9332</p></td><td class="cell"><p>0.9248</p></td><td class="cell"><p>0.9320</p></td><td class="cell"><p>0.9468</p></td><td class="cell"><p>0.9473</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Averaged Perceptron with only local features</p></td><td class="cell"><p>0.9180</p></td><td class="cell"><p>0.9125</p></td><td class="cell"><p>0.9273</p></td><td class="cell"><p>0.9450</p></td><td class="cell"><p>0.9387</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Our System</p></td><td class="cell"><p>0.9263</p></td><td class="cell"><p><b>0.9296</b></p></td><td class="cell"><p><b>0.9355</b></p></td><td class="cell"><p><b>0.9501</b></p></td><td class="cell"><p><b>0.9512</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Our   System   (With modified weight for global features)</p></td><td class="cell"><p><b>0.9354</b></p></td><td class="cell"><p>—</p></td><td class="cell"><p>—</p></td><td class="cell"><p>—</p></td><td class="cell"><p>—</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Significance (p-value)</p></td><td class="cell"><p>&lt; 1.19e-12</p></td><td class="cell"><p>&lt; 4.43e-69</p></td><td class="cell"><p>&lt; 3.55e-88</p></td><td class="cell"><p>&lt; 2.17e-18</p></td><td class="cell"><p>&lt; 2.18e-38</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table></section><references><p>M. Collins. 2002. Discriminative Training Methods for Hidden Markov Models: Theory and Experiments with Perceptron Algorithms. In <i>Proc. of the Empirical Methods in Natural Language Processing (EMNLP). MACL, 2002, </i>1—8, 2000.</p><p>M. Collins. 2002. Ranking Algorithms for Named-Entity Extractions: Boosting and the Voted Perceptron. In <i>Proc. ofACL 2002.</i></p><p>Y. Freund and R. Schapire. 1999. Large Margin Classi­fication using the Perceptron Algorithm. In <i>Machine Learning, </i>37(3): 277—296.</p><p>L. Gillick and S. Cox. 1989. Some Statistical Issues in the Comparison of Speech Recognition Algorithms.</p><p>In <i>Proc. ofIEEE Conf. on Acoustics, Speech and Sig. Proc., Glasgow, 1989, </i>532—535.</p><p>J. Kazama and K. Torisawa. 2007. A New Perceptron Algorithm for Sequence Labeling with Non-local Fea­tures. In <i>Proc. of EMNLP-CoNLL 2007 </i>, pages 315— 324.</p><p>T. Kudo, K. Yamamoto, and Y. Matsumoto. 2004. Ap-pliying Conditional Random Fields to Japanese Mor­phological Analysis. In <i>Proc. of EMNLP 2004.</i></p><p>J. Lafferty, A. McCallum, and F. Pereira. 2001. Condi­tional Random Fields: Probabilistic Models for Seg­menting and Labeling Sequence Data. In <i>Proc. of ICML-2001, </i>pages 591—598.</p><p>A. Ratnaparkhi. 1996. A Maximum Entropy Model for Part-of-Speech Tagging. In <i>Proc. of EMNLP 1996.</i></p><p>A. Stolcke. 2002. SRILM - An Extensible Language Modeling Toolkit. In <i>Proc. Intl. Conf. Spoken Lan­guage Processing, Denver, Colorado, September 2002.</i></p><p>M. Wang and Y. Shi. 2006. A Maximum Entropy Model for Part-of-Speech Tagging. In <i>Proc. of the Fifth SIGHAN Workshop on Chinese Language Processing,</i> <i>Sydney, 2006, </i>pages 205—208.</p><p>Y.Zhang and S.Clark. 2007. Chinese Segmentation with a Word-based Perceptron Algorithm. In <i>Proc. ofACL</i> <i>2007.</i><i></i></p></references></body></article>