Mining Wiki Resources for Multilingual Named Entity Recognition
Alexander E. Richman Patrick Schone Department of Defense Department of Defense Washington, DC 20310 Fort George G. Meade, MD 20755 [email protected] [email protected]
required during development). The expectation is Abstract that for any language in which Wikipedia is sufficiently well-developed, a usable set of training In this paper, we describe a system by which data can be obtained with minimal human the multilingual characteristics of Wikipedia intervention. As Wikipedia is constantly can be utilized to annotate a large corpus of expanding, it follows that the derived models are text with Named Entity Recognition (NER) continually improved and that increasingly many tags requiring minimal human intervention languages can be usefully modeled by this method. and no linguistic expertise. This process, though of value in languages for which In order to make sure that the process is as resources exist, is particularly useful for less language-independent as possible, we declined to commonly taught languages. We show how make use of any non-English linguistic resources the Wikipedia format can be used to identify outside of the Wikimedia domain (specifically, possible named entities and discuss in detail Wikipedia and the English language Wiktionary the process by which we use the Category (en.wiktionary.org)). In particular, we did not use structure inherent to Wikipedia to determine any semantic resources such as WordNet or part of the named entity type of a proposed entity. speech taggers. We used our automatically anno- We further describe the methods by which tated corpus along with an internally modified English language data can be used to variant of BBN's IdentiFinder (Bikel et al., 1999), bootstrap the NER process in other languages. We demonstrate the system by using the specifically modified to emphasize fast text generated corpus as training sets for a variant processing, called “PhoenixIDF,” to create several of BBN's Identifinder in French, Ukrainian, language models that could be tested outside of the Spanish, Polish, Russian, and Portuguese, Wikipedia framework. We built on top of an achieving overall F-scores as high as 84.7% existing system, and left existing lists and tables on independent, human-annotated corpora, intact. Depending on language, we evaluated our comparable to a system trained on up to derived models against human or machine 40,000 words of human-annotated newswire. annotated data sets to test the system. 1 Introduction 2 Wikipedia Named Entity Recognition (NER) has long been a 2.1 Structure major task of natural language processing. Most of Wikipedia is a multilingual, collaborative encyclo- the research in the field has been restricted to a few pedia on the Web which is freely available for re- languages and almost all methods require substan- search purposes. As of October 2007, there were tial linguistic expertise, whether creating a rule- over 2 million articles in English, with versions based technique specific to a language or manually available in 250 languages. This includes 30 lan- annotating a body of text to be used as a training guages with at least 50,000 articles and another 40 set for a statistical engine or machine learning. with at least 10,000 articles. Each language is In this paper, we focus on using the multilingual available for download (download.wikimedia.org) Wikipedia (wikipedia.org) to automatically create in a text format suitable for inclusion in a database. an annotated corpus of text in any given language, For the remainder of this paper, we refer to this with no linguistic expertise required on the part of format. the user at run-time (and only English knowledge
1 Proceedings of ACL-08: HLT, pages 1–9, Columbus, Ohio, USA, June 2008. c 2008 Association for Computational Linguistics Within Wikipedia, we take advantage of five A redirect page is a short entry whose sole pur- major features: pose is to direct a query to the proper page. There • Article links, links from one article to another are a few reasons that redirect pages exist, but the of the same language; primary purpose is exemplified by the fact that • Category links , links from an article to special “USA” is an entry which redirects the user to the “Category” pages; page entitled “United States.” That is, in the vast • Interwiki links , links from an article to a majority of cases, redirect pages provide another presumably equivalent, article in another name for an entity. language; A disambiguation page is a special article • Redirect pages , short pages which often which contains little content but typically lists a provide equivalent names for an entity; and number of entries which might be what the user • Disambiguation pages , a page with little was seeking. For instance, the page “Franklin” content that links to multiple similarly named contains 70 links, including the singer “Aretha articles. Franklin,” the town “Franklin, Virginia,” the The first three types are collectively referred to as “Franklin River” in Tasmania, and the cartoon wikilinks . character “Franklin (Peanuts).” Most disambigua- A typical sentence in the database format looks tion pages are in Category:Disambiguation or one like the following: of its subcategories.
“Nescopeck Creek is a [[tributary]] of the [[North 2.2 Related Studies Branch Susquehanna River]] in [[Luzerne County, Wikipedia has been the subject of a considerable Pennsylvania|Luzerne County]].” amount of research in recent years including Gabrilovich and Markovitch (2007), Strube and The double bracket is used to signify wikilinks. In Ponzetto (2006), Milne et al. (2006), Zesch et al. this snippet, there are three articles links to English (2007), and Weale (2007). The most relevant to language Wikipedia pages, titled “Tributary,” our work are Kazama and Torisawa (2007), Toral “North Branch Susquehanna River,” and “Luzerne and Muñoz (2006), and Cucerzan (2007). More County, Pennsylvania.” Notice that in the last link, details follow, but it is worth noting that all known the phrase preceding the vertical bar is the name of prior results are fundamentally monolingual, often the article, while the following phrase is what is developing algorithms that can be adapted to other actually displayed to a visitor of the webpage. languages pending availability of the appropriate Near the end of the same article, we find the semantic resource. In this paper, we emphasize the following representations of Category links: use of links between articles of different languages, [[Category:Luzerne County, Pennsylvania]], specifically between English (the largest and best [[Category:Rivers of Pennsylvania]], {{Pennsyl- linked Wikipedia) and other languages. vania-geo-stub}}. The first two are direct links to Toral and Muñoz (2006) used Wikipedia to cre- Category pages. The third is a link to a Template, ate lists of named entities. They used the first which (among other things) links the article to sentence of Wikipedia articles as likely definitions “Category:Pennsylvania geography stubs”. We of the article titles, and used them to attempt to will typically say that a given entity belongs to classify the titles as people, locations, organiza- those categories to which it is linked in these ways. tions, or none. Unlike the method presented in this The last major type of wikilink is the link be- paper, their algorithm relied on WordNet (or an tween different languages. For example, in the equivalent resource in another language). The au- Turkish language article “Kanuni Sultan Süley- thors noted that their results would need to pass a man” one finds a set of links including [[en:Sulei- manual supervision step before being useful for the man the Magnificent]] and [[ru: Сулейман I]]. NER task, and thus did not evaluate their results in These represent links to the English language the context of a full NER system. article “Suleiman the Magnificent” and the Russian Similarly, Kazama and Torisawa (2007) used language article “ Сулейман I.” In almost all Wikipedia, particularly the first sentence of each cases, the articles linked in this manner represent article, to create lists of entities. Rather than articles on the same subject. building entity dictionaries associating words and
2 phrases to the classical NER tags (PERSON, LO- not marked in an existing corpus or not needed for CATION, etc.) they used a noun phrase following a given purpose, the system can easily be adapted. forms of the verb “to be” to derive a label. For ex- Our goal was to automatically annotate the text ample, they used the sentence “Franz Fischler ... is portion of a large number of non-English articles an Austrian politician” to associate the label “poli- with tags like
3 Table 1: Some Useful Key Category Phrases 3.3 Multilingual Categorization When attempting to categorize a non-English term PERSON “People by”, “People in”, “People from”, that has an entry in its language’s Wikipedia, we “Living people”, “births”, “deaths”, “by occupation”, “Surname”, “Given names”, use two techniques to make a decision based on “Biography stub”, “human names” English language information. First, whenever ORG “Companies”, “Teams”, “Organizations”, possible, we find the title of an associated English “Businesses”, “Media by”, “Political language article by searching for a wikilink parties”, “Clubs”, “Advocacy groups”, beginning with “en:”. If such a title is found, then “Unions”, “Corporations”, “Newspapers”, we categorize the English article as shown in “Agencies”, “Colleges”, “Universities” , Section 3.2, and decide that the non-English title is “Legislatures”, “Company stub”, “Team of the same type as its English counterpart. We stub”, “University stub”, “Club stub” note that links to/from English are the most GPE “Cities”, “Countries”, “Territories”, common interlingual wikilinks. “Counties”, “Villages”, “Municipalities”, Of course, not all articles worldwide have Eng- “States” (not part of “United States”), “Republics”, “Regions”, “Settlements” lish equivalents (or are linked to such even if they DATE “Days”, “Months”, “Years”, “Centuries” do exist). In this case, we attempt to make a deci- NONE “Lists”, “List of”, “Wars”, “Incidents” sion based on Category information, associating the categories with their English equivalents, when
possible. Fortunately, many of the most useful For each article, we searched the category categories have equivalents in many languages. hierarchy until a threshold of reliability was passed For example, the Breton town of Erquy has a or we had reached a preset limit on how far we substantial article in the French language Wikipe- would search. dia, but no article in English. The system proceeds For example, when the system tries to classify by determining that Erquy belongs to four French “Jacqueline Bhabha,” it extracts the categories language categories: “Catégorie:Commune des “British Lawyers,” “Jewish American Writers,” Côtes-d'Armor,” “Catégorie:Ville portuaire de and “Indian Jews.” Though easily identifiable to a France,” “Catégorie:Port de plaisance,” and human, none of these matched any of our key “Catégorie:Station balnéaire.” The system pro- phrases, so the system proceeded to extract the ceeds to associate these, respectively, with “Cate- second order categories “Lawyers by nationality,” gory:Communes of Côtes-d'Armor,” UNKNOWN, “British legal professionals,” “American writers by “Category:Marinas,” and “Category:Seaside re- ethnicity,” “Jewish writers,” “Indian people by sorts” by looking in the French language pages of religion,” and “Indian people by ethnic or national each for wikilinks of the form [[en:...]]. origin” among others. “People by” is on our key The first is a subcategory of “Category:Cities, phrase list, and the two occurrences passed our towns and villages in France” and is thus easily threshold, and she was then correctly identified. identified by the system as a category consisting of If an article is not classified by this method, we entities of type GPE. The other two are ambiguous check whether it is a disambiguation page (which categories (facility and organization elements in often are members solely of “Category:Disam- addition to GPE). Erquy is then determined to be biguation”). If it is, the links within are checked to a GPE by majority vote of useful categories. see whether there is a dominant type. For instance, We note that the second French category actu- the page “Amanda Foreman” is a disambiguation ally has a perfectly good English equivalent (Cate- page, with each link on the page leading to an gory:Port cities and towns in France), but no one easily classifiable article. has linked them as of this writing. We also note Finally, we use Wiktionary, an online colla- that the ambiguous categories are much more borative dictionary, to eliminate some common GPE-oriented in French. The system still makes nouns. For example, “Tributary” is an entry in the correct decision despite these factors. Wikipedia which would be classified as a Location We do not go beyond the first level categories if viewed solely by Category structure. However, or do any disambiguation in the non-English case. it is found as a common noun in Wiktionary, over- Both are avenues for future improvement. ruling the category based result.
4 3.4 The Full System Wikipedia entries of their own or are partial To generate a set of training data in a given lan- matches to known people and organizations (i.e. guage, we select a large number of articles from its “Mary Washington” in an article that contains Wikipedia (50,000 or more is recommended, when “University of Mary Washington”). We require possible). We prepare the text by removing exter- that each such string contains something other than nal links, links to images, category and interlingual a lower case letter (when a language does not use links, as well as some formatting. The main pro- capitalization, nothing in that writing system is cessing of each article takes place in several stages, considered to be lower case for this purpose). whose primary purposes are as follows: When a word is in more than one such phrase, the • The first pass uses the explicit article links longest match is used. within the text. We then do some special case processing. • We then search an associated English language When an organization is followed by something in article, if available, for additional information. parentheses such as
5 3.5 Optional Processing appearing in the same article is also referring to the river and thus mark it as a LOCATION. 3.5.1 Recommended Additions For some languages, we preferred an alternate All of the above could be run with almost no un- approach, best illustrated by an example: The derstanding of the language being modeled word “Washington” without context could refer to (knowing whether the language was space-sepa- (among others) a person, a GPE, or an organiza- rated and whether it was alphabetic or character- tion. We could work through all of the explicit based were the only things used). However, for wikilinks in all articles (as a preprocessing step) most languages, we spent a small amount of time whose surface form is Washington and count the (less than one hour) browsing Wikipedia pages to number pointing to each. We could then decide improve performance in some areas. that every time the word Washington appears We suggest compiling a small list of stop without an explicit link, it should be marked as its words. For our purposes, the determiners and the most common type. This is useful for the Slavic most common prepositions are sufficient, though a languages, where the nominative form is typically longer list could be used for the purpose of com- used as the title of Wikipedia articles, while other putational efficiency. cases appear frequently (and are rarely wikilinked). We also recommend compiling a list of number At the same time, we can do a second type of words as well as compiling a list of currencies, preprocessing which allows more surface forms to since they are not capitalized in many languages, be categorized. For instance, imagine that we were and may not be explicitly linked either. Many lan- in a Wikipedia with no article or redirect associ- guages have a page on ISO 4217 which contains ated to “District of Columbia” but that someone all of the currency information, but the format had made a wikilink of the form [[Washing- varies sufficiently from language to language to ton|District of Columbia]]. We would then make make automatic extraction difficult. Together, the assumption that for all articles, District of Co- these allow phrases like this (taken from the lumbia is of the same type as Washington. French Wikipedia) to be correctly marked in its For less developed wikipedias, this can be entirety as an entity of type MONEY: “25 millions helpful. For languages that have reasonably well de dollars.” developed Wikipedias and where entities rarely, if If a language routinely uses honorifics such as ever, change form for grammatical reasons (such Mr. and Mrs., that information can also be found as French), this type of preprocessing is virtually quickly. Their use can lead to significant im- irrelevant. Worse, this processing is definitely not provements in PERSON recognition. recommended for languages that do not use capi- During preprocessing, we typically collected a talization because it is not unheard of for people to list of people names automatically, using the entity include sections like: “The [[Union Station|train identification methods appropriate to titles of station]] is located at ...” which would cause the Wikipedia articles. We then used these names phrase “train station” to be marked as a FACILITY along with the Wiktionary derived list of names each time it occurred. Of course, even in lan- during the main processing. This does introduce guages with capitalization, “train station” would be some noise as the person identification is not per- marked incorrectly in the article in which the fect, but it ordinarily increases recall by more than above was located, but the mistake would be iso- it reduces precision. lated, and should have minimal impact overall. 3.5.2 Language Dependent Additions 4 Evaluation and Results Our usual, language-neutral processing only After each data set was generated, we used the text considers wikilinks within a single article when as a training set for input to PhoenixIDF. We had determining the type of unlinked words and three human annotated test sets, Spanish, French phrases. For example, if an article included the and Ukrainian, consisting of newswire. When sentence “The [[Delaware River|Delaware]] forms human annotated sets were not available, we held the boundary between [[Pennsylvania]] and [[New out more than 100,000 words of text generated by Jersey]]”, our system makes the assumption that our wiki-mining process to use as a test set. For the every occurrence of the unlinked word “Delaware” above languages, we included wiki test sets for
6 comparison purposes. We will give our results as To attempt to answer this question, we trained F-scores in the Overall, DATE, GPE, PhoenixIDF on additional ACE 2007 Spanish lan- ORGANIZATION, and PERSON categories using guage data converted to MUC-style tags, and the scoring metric in (Bikel et. al, 1999). The scored its performance using the same set of other ACE categories are much less common, and newswire. Evidently, comparable performance to contribute little to the overall score. our Wikipedia derived system requires between 4.1 Spanish Language Evaluation 20,000 and 40,000 words of human-annotated newswire. It is worth noting that Wikipedia itself The Spanish Wikipedia is a substantial, well-de- is not newswire, so we do not have a perfect com- veloped Wikipedia, consisting of more than parison. 290,000 articles as of October 2007. We used two test sets for comparison purposes. The first con- Table 3: Traditional Training sists of 25,000 words of human annotated news- wire derived from the ACE 2007 test set, manually ~ Words of Training Overall F-score modified to conform to our extended MUC-style standards. The second consists of 335,000 words 3500 .746 of data generated by the Wiki process held-out 10,000 .760 during training. 20,000 .807 Table 2: Spanish Results 40,000 .847
F (prec. / recall) Newswire Wiki test set 4.2 French Language Evaluation ALL .827 (.851 / .805) .846 (.843 / .848) The French Wikipedia is one of the largest DATE .912 (.861 / .970) .925 (.918 / .932) Wikipedias, containing more than 570,000 articles as of October 2007. For this evaluation, we have GPE .877 (.914 / .843) .877 (.886 / .868) 25,000 words of human annotated newswire ORG .629 (.681 / .585) .701 (.703 / .698) (Agence France Presse , 30 April and 1 May 1997) PERSON .906 (.921 / .892) .821 (.810 / .833) covering diverse topics. We used 920,000 words of Wiki-derived data for the second test.
There are a few particularly interesting results Table 4: French Results to note. First, because of the optional processing, recall was boosted in the PERSON category at the F (prec. / recall) Newswire Wiki test set expense of precision. The fact that this category scores higher against newswire than against the ALL .847 (.877 / .819) .844 (.847 / .840) wiki data suggests that the not-uncommon, but DATE .921 (.897 / .947) .910 (.888 / .934) isolated, occurrences of non-entities being marked as PERSONs in training have little effect on the GPE .907 (.933 / .882) .868 (.889 / .849) overall system. Contrarily, we note that deletions ORG .700 (.794 / .625) .718 (.747 / .691) are the dominant source of error in the ORGANI- PERSON .880 (.874 / .885) .823 (.818 / .827) ZATION category, as seen by the lower recall. The better performance on the wiki set seems to suggest that either Wikipedia is relatively poor in The overall results seem comparable to the Span- Organizations or that PhoenixIDF underperforms ish, with the slightly better overall performance when identifying Organizations relative to other likely correlated to the somewhat more developed categories or a combination. Wikipedia. We did not have sufficient quantities of An important question remains: “How do these annotated data to run a test of the traditional meth- results compare to other methodologies?” In par- ods, but Spanish and French are sufficiently similar ticular, while we can get these results for free, how languages that we expect this model is comparable much work would traditional methods require to to one created with about 40,000 words of human- achieve comparable results? annotated data.
7 4.3 Ukrainian Language Evaluation ing. In each case, at least 100,000 words were held out from training to be used as a test set. It seems The Ukrainian Wikipedia is a medium-sized safe to suppose that if suitable human-annotated Wikipedia with 74,000 articles as of October 2007. sets were available for testing, the PERSON score Also, the typical article is shorter and less well- would likely be higher, and the ORGANIZATION linked to other articles than in the French or Span- score would likely be lower, while the DATE and ish versions. Moreover, entities tend to appear in GPE scores would probably be comparable. many surface forms depending on case, leading us to expect somewhat worse results. In the Ukrain- Table 7: Other Language Results ian case, the newswire consisted of approximately 25,000 words from various online news sites cov- F-score Polish Portuguese Russian ering primarily political topics. We also held out around 395,000 words for testing. We were also ALL .859 .804 .802 able to run a comparison test as in Spanish. DATE .891 .861 .822
Table 5: Ukrainian Results GPE .916 .826 .867
ORG .785 .706 .712 F (prec. / recall) Newswire Wiki test set PERSON .836 .802 .751 ALL .747 (.863 / .649) .807 (.809 / .806)
DATE .780 (.759 / .803) .848 (.842 / .854) 5 Conclusions GPE .837 (.833 / .841) .887 (.901 / .874) In conclusion, we have demonstrated that Wikipe- ORG .585 (.800 / .462) .657 (.678 / .637) dia can be used to create a Named Entity Recogni- tion system with performance comparable to one PERSON .764 (.899 / .664) .690 (.675 / .706) developed from 15-40,000 words of human-anno- tated newswire, while not requiring any linguistic Table 6: Traditional Training expertise on the part of the user. This level of per- formance, usable on its own for many purposes, ~ Words of Training Overall F-score can likely be obtained currently in 20-40 lan- guages, with the expectation that more languages 5000 .662 will become available, and that better models can 10,000 .692 be developed, as Wikipedia grows. Moreover, it seems clear that a Wikipedia-de- 15,000 .740 rived system could be used as a supplement to 20,000 .761 other systems for many more languages. In par- ticular, we have, for all practical purposes, embed- The Ukrainian newswire contained a much higher ded in our system an automatically generated proportion of organizations than the French or entity dictionary. Spanish versions, contributing to the overall lower In the future, we would like to find a way to score. The Ukrainian language Wikipedia itself automatically generate the list of key words and contains very few articles on organizations relative phrases for useful English language categories. to other types, so the distribution of entities of the This could implement the work of Kazama and two test sets are quite different. We also see that Torisawa, in particular. We also believe perform- the Wiki-derived model performs comparably to a ance could be improved by using higher order non- model trained on 15-20,000 words of human- English categories and better disambiguation. We annotated text. could also experiment with introducing automati- cally generated lists of entities into PhoenixIDF 4.4 Other Languages directly. Lists of organizations might be parti-
For Portuguese, Russian, and Polish, we did not cularly useful, and “List of” pages are common in have human annotated corpora available for test- many languages.
8 References Zesch, T., I. Gurevych and M. Mühlhäuser. 2007. Analyzing and accessing Wikipedia as a lexical Bikel, D., R. Schwartz, and R. Weischedel. 1999. semantic resource. In Proceedings of GLDV , An algorithm that learns what's in a name. Ma- 213-21. chine Learning , 211-31.
Bunescu, R and M. Pa şca. 2006. Using Encyclope- dic knowledge for named entity disambigua- tion. In Proceedings of EACL , 9-16.
Cucerzan, S. 2007. Large-scale named entity dis- ambiguation based on Wikipedia data. In Pro- ceedings of EMNLP/CoNLL , 708-16.
Gabrilovitch, E. and S. Markovitch. 2007. Com- puting semantic relatedness using Wikipedia- based explicit semantic analysis. In Proceed- ings of IJCAI , 1606-11.
Gabrilovitch, E. and S. Markovitch. 2006. Over- coming the brittleness bottleneck using Wikipedia: enhancing text categorization with encyclopedic knowledge. In Proceedings of AAAI , 1301-06.
Gabrilovitch, E. and S. Markovitch. 2005. Feature generation for text categorization using world knowledge. In Proceedings of IJCAI , 1048-53.
Kazama, J. and K. Torisawa. 2007. Exploiting Wikipedia as external knowledge for named entity recognition. In Proceedings of EMNLP/CoNLL , 698-707.
Milne, D., O. Medelyan and I. Witten. 2006. Min- ing domain-specific thesauri from Wikipedia: a case study. Web Intelligence 2006 , 442-48
Strube, M. and S. P. Ponzeto. 2006. WikiRelate! Computing semantic relatedness using Wikipedia. In Proceedings of AAAI , 1419-24.
Toral, A. and R. Muñoz. 2006. A proposal to automatically build and maintain gazetteers for named entity recognition by using Wikipedia. In Proceedings of EACL , 56-61.
Weale, T. 2006. Using Wikipedia categories for document classification. Ohio St. University, preprint .
9