Elamur Research

Creating Open Language Resources for Hungarian

Paper · 2004 · Péter Halácsy, András Kornai, László Németh et al.

Summary

A Hungarian frequency dictionary already existed when the authors began their project, but it was based on literary writing. Anyone who wanted to count words in a broader collection faced another difficulty. Many Hungarian text collections and processing tools were hard to obtain or came with restrictions on reuse. The SzóSzablya project set out to make both the data and the tools publicly available. Its main collection, web2, began with about 18.7m pages from the .hu domain. The paper follows those pages through a series of decisions about what counts as text, which pages count as copies, how strict a spelling filter should be, and which written forms belong under the same dictionary entry.

The authors first removed material such as binary files and markup. They then used a rule-based tool to find sentence boundaries. This helped them recognize copies whose main text was identical even if their automatically generated dates or headings differed. On the Szeged Corpus, their sentence-boundary tool had a reported error rate of 1.3%, compared with 7.0% for a simple regular-expression baseline. After normalization and duplicate removal, web2 held about 3.5m documents, still including material in other languages. A Hungarian spellchecker gave the team a way to make subsets with different levels of spelling conformity. The setting that allowed up to 8% spelling errors retained 928m tokens, the individual units counted in the text. The stricter 4% setting retained 589m.

The processing choices also changed what appeared to be frequent. When the pilot split web addresses into separate pieces, HU led its ranking of words by the number of documents in which they appeared. Keeping the domain suffix distinct from the Hungarian particle hu removed that effect. The authors also grouped related written forms under a lemma, the headword used for a dictionary entry. This raised the prominence of words such as the copula van because its affixed forms could contribute to the same count. The resulting dictionary was approximate. A spelling could still belong to several headwords or represent several meanings, and the procedure left those cases unresolved.

The authors compared the web counts with the established literary frequency dictionary. For words that occurred in both sources, the reported correlation between their log frequencies was 0.64. The web subsets correlated with one another at 0.98 or better. In the authors’ interpretation, the literary dictionary still better reflects literary usage, while the web collection samples a wider range of writing. The paper gives readers enough detail to see how a frequency figure depends on the material collected and on the decisions made before counting begins.

Deep dive: Creating Open Language Resources for Hungarian

The SzóSzablya project built an open Hungarian web corpus and showed how page cleaning, spelling filters, and stemming shape word frequency counts. · about 31 minutes to read

The problem and its context

Obtaining text that researchers could reuse

As Hungary was joining the European Union, the authors saw a growing need for Hungarian language resources that more people could use. The paper distinguishes collections of linguistic data from the software that processes them. A corpus is an organized collection of texts. Word lists, frequency counts, and machine-readable dictionaries can be distributed as resources in their own right. A tokenizer, a spellchecker, or a tool for analyzing word structure is software that can help turn the same collection into several such resources. Access to either side affects what a researcher can do with the other. A list of published counts answers questions about the units its compiler chose. Direct access to the texts and processing tools lets a researcher define a different unit and count it across the collection.

The authors describe an existing Hungarian infrastructure that already included both types of work. There were collections, dictionaries, and counts, as well as software for tasks such as analyzing morphology, the structure of words and their forms. The immediate difficulty was a practical one. According to the paper, organizations that developed many of these resources treated them as proprietary. Access could be difficult even for research, and the authors describe barriers to commercial research and development as well. The SzóSzablya project began in March 2003 with the aim of offering a broad collection of data and tools that people could use under permissive, LGPL-style terms.

The paper describes several Hungarian corpora that were already available in some form. The Hungarian National Corpus and Hungarian Historical Corpus were substantial text resources, while the Szeged Corpus offered manually annotated material. The authors also mention a machine-readable version of Orwell’s 1984 prepared for the Copernicus project. They point out that collections of this kind carry linguistic annotation, information added to the text about its words and their analyses. Some of that information had been disambiguated by hand. A raw page collection and a hand-corrected corpus therefore answer different needs even when one can express their sizes in the same units. A researcher who needs a verified analysis of a sentence cannot infer its availability from the word count.

The paper identifies the SZTAKI collection as another sizeable Hungarian web crawl and says the project repository made it available with SZTAKI’s permission. The relevant precedent was thus broader than a choice between the web and edited collections. There were already ways to acquire text from the web, and there were corpora with valuable linguistic analyses. The project’s task was to turn a large crawl into a collection with explicit processing rules and to make that collection useful for deriving counts.

Asking a new frequency question

Frequency depends on the event being counted. A researcher might want to know how frequently a word occurs, how widely it is distributed across documents, how frequently particular letters occur, or how many times a sequence of adjacent units appears. Such a sequence is an n-gram. Adjacent words can form one kind of n-gram, and adjacent characters can form another. A search interface that supplies the number of documents containing an individual word is suited to a narrower question than a downloadable collection from which any of these counts can be derived.

The authors use the Hungarian Historical Corpus to illustrate the distinction. Its online interface could supply individual document frequencies. Someone investigating a specific item could ask how many documents contained it. The paper describes much more limited access to Hungarian word counts in bulk. The principal public source it identifies was Füredi and Kelemen’s frequency dictionary, which it calls FK89. That dictionary was based on a 500k-word collection of literary writing. Its most frequent entries had circulated in print, and simplified counts were available through the SZÓTÁR lexical database. The project repository also made these resources available with the authors’ permission.

The literary basis of FK89 gave it a domain in which a frequency could be interpreted. If a researcher’s question concerns literary prose, a collection selected for literary prose has a clear purpose. The SzóSzablya team wanted a separate source that could represent uses beyond that domain and support more flexible counting. This also meant deciding whether an entry should represent a written form, such as one inflection of a verb, or a group of forms that share a dictionary headword. The paper treats the difference as central to what a frequency dictionary can say about a language.

Selecting useful text from the web

The .hu domain gave the project a place to start collecting pages. A domain name says where a page was found in the crawl. The text at that address can be Hungarian, foreign-language, or a mixture. Some addresses lead to material that is unsuitable for direct treatment as running text. Even pages with ordinary Hungarian prose can contain navigation, dates, or other recurrent fragments surrounding it. Each of these properties creates a different problem for counts. Foreign text can bring in unrelated words. Repeated pages can give the same passage extra influence. Navigation and addresses can introduce strings that look like words to a simple splitter.

The authors describe another choice that applies even after these issues are addressed. Web text contains edited prose, computer jargon, and short messages with their own writing conventions. Some pages substitute unaccented characters for Hungarian letters. A collection that keeps such writing can serve a study of how people write online. A user looking for evidence about standard spelling may prefer a narrower selection. The project needed a way to make that selection without requiring readers with different purposes to accept the same boundary.

The paper also sets its technical choices against earlier approaches. It relates its rule-based sentence boundary tool to work by Mikheev on periods and capitalization. For duplicate detection, it discusses a web similarity technique by Chakrabarti that can identify variants with edited or rephrased passages. The authors’ problem included a class of easier cases. A page may carry the same sentences and differ only in automatically supplied material. Identifying cases of that kind could remove some large sources of repetition through a cheaper comparison. The resource-building problem therefore involved choosing what distinctions were worth making across the full crawl, as well as deciding what to count once the text was ready.

The method, step by step

From fetched pages to comparable text

The work began with an Axelero crawl of approximately six million pages in the .hu domain. In this pilot, the team used MD5 checksums to find identical pages. A checksum is a compact value computed from an input. Two copies of an unchanged page give the same value, so the crawler’s output can be searched for matching values without comparing every page directly against every other page. This pilot used the fetched pages for that test. A date added to a page can change the checksum even if the article beneath it stays the same.

The pilot removed HTML tags, split the remaining text at punctuation, hyphens, and whitespace, and converted the pieces to upper-case. This is an instance of tokenization, the process of deciding where units such as words begin and end. The pilot also calculated document frequencies for individual items and word pairs. Document frequency counts a document once for an item that occurs anywhere within it. A word printed repeatedly on a single page contributes a single document to that word’s count. Text frequency counts every occurrence. The authors decided during the pilot series that text frequency was more useful for their routine n-gram counts and changed the processing infrastructure accordingly. They still used document frequency in parts of the paper to examine the distribution of items across pages.

The main collection used the larger crawl and retained distinctions that the pilot had removed. It preserved case during tokenization and adopted rules for recognizing material such as dates and web address components. It also changed the input to the duplicate check. In web2, the useful comparison was between sentence text extracted from pages. The order matters. The software first needs to get usable characters from the source and recognize the sentences before it can base duplicate detection on them.

How the crawl became a corpus and frequency dictionary

The steps in order.

How the crawl became a corpus and frequency dictionaryStep 1: Crawl pages in the Hungarian web domain1. Crawl pages in the Hungarian web domainStep 2: Extract text and normalize character encoding2. Extract text and normalize character encodingStep 3: Find sentences and classify tokens3. Find sentences and classify tokensStep 4: Identify repeats using checksums of sentence text4. Identify repeats using checksums of sentence textStep 5: Score pages with the Hungarian spellchecker5. Score pages with the Hungarian spellcheckerStep 6: Select subsets at different spelling cutoffs6. Select subsets at different spelling cutoffsStep 7: Group related forms and count their occurrences7. Group related forms and count their occurrences

HunNorm performs the initial normalization for web2. It strips HTML markup and produces text files in a common character encoding. The authors describe it as a pipeline built with flex. Its supporting programs include GNU Recode for conversion to UTF-8 and file for identifying file types. Recognizing a file type lets the pipeline discard binary material before trying to process it as text. The combination addresses two separate problems. Markup can be removed from a page that has usable text beneath it. A binary file can be excluded because it takes a different procedure to obtain usable text from it.

Normalization makes comparisons possible at the character level. Two files need a common encoding before later rules can reliably recognize the same written symbols in them. This conversion also has to be distinguished from the treatment of accentless writing. Putting a file in UTF-8 standardizes how its existing characters are represented. A writer who originally substituted an unaccented letter for a Hungarian accented letter has already changed the visible text. Such pages can still reach the spelling filter. The later choice about whether to keep them is a selection decision.

Finding the sentences that describe a page

HunToken uses rules to decide where sentences end. The implementation uses flex, 25 regular-expression rules, and an abbreviation list containing approximately 150 words. A regular expression identifies a pattern in the characters around a possible boundary. The list gives the rules information about recurring abbreviations. This is helpful because a period may be part of an abbreviation or mark the close of a sentence. Correctly making that distinction matters for the next operation, which treats detected sentence text differently from material outside sentences.

The project also uses HunToken to identify types of token, including punctuation, numbers, dates, and times. It classifies tokens using the same scheme as the Szeged Corpus. The paper describes the corpus format as extended TEI LITE XML with MSD codes for morphological information. For web2, the immediate benefit of classification is that the tool can treat a pattern according to what it represents. A date can be handled as a date rather than producing separate entries for every piece of it. Grouping characters in ways that respect these categories changes the vocabulary that the counting program sees.

Detected sentences provide the input to the new duplicate procedure. The authors first exclude material that falls outside the sentence bodies. They then calculate checksums using what is left. Suppose an article is served twice with different automatically generated dates. If the dates sit outside the detected sentences and the sentences themselves agree, both pages give the same input to the comparison. The system can use that match to suppress a copy. It can also drop pages that yield no useful sentence text, such as a page dominated by interface material.

This method tests identity after a particular reduction of the page. It does not require that the original HTML files agree. It does require enough agreement in the extracted sentence bodies for the checksum comparison to find a match. A revision that changes wording inside the sentences presents a different problem. The paper’s comparison with the more sensitive similarity technique is about the kinds of variation each procedure handles and their computational cost. The authors chose the checksum method for the version of duplication they could address efficiently at crawl scale.

Preserving case and position for counting

Case and sentence position are retained because the same sequence of letters can have different interpretations depending on where it appears. In the middle of a sentence, Kovács can be distinguished from kovács by its initial capital. The paper uses the former for the family name and the latter for the common noun meaning blacksmith. At the start of a sentence, the common noun also begins with a capital. The initial form then gives the reader and the counting program less information about which reading is intended.

HunToken’s sentence boundaries make it possible to keep initial occurrences in a separate counting category. The paper describes using an appended asterisk to mark them. This annotation leaves the count of medial capitalized forms available alongside the count of medial lower-case forms. A procedure that uppercases everything at the beginning would lose the distinction before a later stage could use it. A procedure that preserves capitals but overlooks sentence position would mix ambiguous capitalized forms with occurrences where capitalization provides stronger evidence.

The authors discuss a way to estimate how the ambiguous initial occurrences might be distributed. The relative frequency of the readings in unambiguous positions can serve as the basis for allocating the ambiguous ones, provided that sentence position is independent of the reading. In this example, the assumption would mean that being a name or a common noun has no effect on how often the item occurs at the start. The proposal uses regularities available in the counts. It does not assign a reading by examining the content of each individual sentence. Retaining the positional category makes it possible to inspect the data on which that estimate would rely.

Preserving information in the corpus also leaves room for a different choice in the dictionary. The authors ultimately merge case and position variants when producing their approximate headword counts. These are separate decisions at separate stages. During tokenization, preserving distinctions lets researchers examine them. During dictionary construction, pooling forms gives a broader count for a proposed entry. The pooled figure loses the evidence available from the separate counts, which is why the paper discusses both.

Selecting documents by spelling conformity

The normalized, deduplicated web2 corpus still contains foreign and mixed-language pages, as well as Hungarian writing that departs from official spelling conventions. The authors use HunSpell to characterize that material. HunSpell uses an extended version of the MySpell library, which descends from ispell. The software can work with resources for different languages. In this study the team uses open Hungarian resource files, so the reported spelling errors are measured against the Hungarian spellchecker’s coverage and rules.

Each document is checked as a unit. The system assigns a percentage of spelling errors, and a document enters a spelling stratum if its percentage is within the selected cutoff. The decision rule can be written as follows.

e ≤ τ

e is the percentage of spelling errors returned for the document. τ is the maximum percentage allowed in the selected stratum. ≤ means that a document at or below that cutoff is retained. The paper defines the selection in terms of a maximum allowed percentage. It gives no corresponding symbolic calculation for how every class of token contributes to that percentage.

The authors use settings of 40, 8, and 4 for τ, and use 100 to represent the absence of spelling-based filtering. The resulting subsets are nested. A page that satisfies the stricter threshold also satisfies a more permissive one. The paper describes 40 as a useful cutoff for removing foreign-language pages while retaining Hungarian pages with considerable spelling variation, including pages written without some of their accents. The 8 setting removes such accentless pages more aggressively while retaining computer jargon and other unconventional writing. The stricter 4 setting is intended for applications that benefit from a higher degree of spelling conformity.

The score acts on documents because the language signal comes from the distribution of accepted and rejected words across a page. The occasional shared spelling between languages has little force by itself. Hungarian fuss, for instance, can mean ‘run’, and the same letters occur in the German and English examples the paper gives. A foreign page can contain names or Hungarian quotations too. The authors’ approach depends on such overlaps being sparse enough in many foreign documents that the rest of the page still produces numerous rejections. In a mainly Hungarian document, a foreign name or short quotation can coexist with a low document-level score.

Language and spelling quality are related here because the same score is used for both. At a permissive cutoff, the main contrast the authors seek is between pages predominantly written in Hungarian and pages with little Hungarian text. At a tight cutoff, differences among Hungarian pages become more important. This gives a single procedure several selection settings. Its output is a family of corpus subsets that can be compared or used separately, according to the intended analysis.

From written forms to dictionary entries

The final step is approximate lemmatization. In this setting, lemmatization groups forms such as an unaffixed verb and its inflected forms under a dictionary headword. The corpus can supply a count for each recorded word form, meaning a form as written in the text. A frequency dictionary also needs a way to put related forms under a common entry. A productive word can occur in many ways, so an individual written form may have a much smaller count than the headword represented by all of them together.

For that grouping, the authors use HunStem, an extended version of the HunSpell library. Stemming uses information about a word’s structure, here chiefly rules for stripping affixes, to recover a candidate stem. An affix is an element attached to a word or stem that changes its grammatical form or helps make a related word. HunStem follows the spellchecker’s affix rules and can return more than one stem when a form is ambiguous. It also supplies partial morphological information, which the authors say allows exceptions to be lemmatized correctly.

Returning possible stems and choosing among them are different operations. A surface form may support several analyses. Distinct entries can also share a spelling, as with nap for ‘sun’ and nap for ‘day’. Those readings already agree in their letters, so removing affixes cannot tell them apart. The dictionary in the paper pools forms by stem without resolving these ambiguities. A headword count should therefore be read as an approximate total assembled by the grouping procedure. It can reflect the contribution of inflected forms while still leaving open which lexical reading accounts for particular occurrences.

The authors use the same counting idea across the spelling strata. For each headword in the reported list they give a count of forms and a text frequency. The form count describes the variety of written forms gathered under the entry. The text frequency describes the total occurrence count associated with it. The figures answer complementary questions. A common item can have a single counted form, while an inflecting word can have many. The frequencies then show how frequently those forms appeared in the selected text. The procedure relies on the project’s spelling resources, token rules, and affix rules. The paper reports resource construction and a benchmark for sentence boundaries, with no supervised training procedure for the corpus pipeline.

Experiments and results

The pilot and the main collection

The pilot produced over 2 billion word tokens after its initial processing of roughly six million pages. Those tokens used the pilot’s splitting rules and upper-case normalization. The unigram document-frequency inventory contained 31.1 million distinct types. A type is a distinct item in the inventory, while a token is an occurrence of an item in the material being counted. Of the pilot’s unigram types, 18.3 million were document-frequency hapaxes. Here a hapax means an item restricted to a single document. It could still have appeared repeatedly inside that document. The figure describes how much of the vocabulary was confined to individual pages under the pilot’s definition of a token.

The main raw crawl for web2 comprised about 18.7m pages and occupied about 50GB compressed. The authors say HunNorm usually reduces the size of its input by 50% or more. They also report a reduction of more than 50% for the step that uses sentence bodies to detect duplicates and exclude pages without usable sentences. The figures describe particular processing stages. The paper’s end point for text extraction and deduplication is about 3.5m documents, occupying 5.2GB compressed. That is the web2 collection before spelling-based selection, so its document count includes foreign and mixed-language pages.

For comparison, the paper gives a size of 153.7m words for the Hungarian National Corpus and 24.5m words for the Hungarian Historical Corpus. The Szeged Corpus is reported at 1m words. These are word counts for prior corpora, whereas the initial web2 figure of 18.7m is a count of fetched pages and the compression figures measure storage. The comparison becomes more interpretable when web2 is measured in tokens after cleanup and when the kind of annotation in the earlier corpora is taken into account. An annotated reference collection can support a test whose answers could not be read from the cleaned web crawl alone. The authors use the Szeged Corpus in just that way for sentence boundaries.

Sentence boundary errors on the Szeged Corpus

The evaluation compares HunToken’s sentence decisions with boundaries in the Szeged Corpus. The benchmark contains 86,094 sentences. Against that reference, the authors report 1064 cases in which HunToken identified boundaries incorrectly, with a reported error rate of 1.3%. A simple regular-expression baseline made 6083 errors, reported as 7.0%. The baseline represents the kind of boundary decision that can be made with a simple pattern. HunToken has multiple rules and a list of abbreviations, giving it access to distinctions that a simpler pattern may miss.

HunToken and the simple baseline on Szeged Corpus sentence boundary error

HunToken makes fewer sentence boundary errors than the simple regular expression.

HunToken and the simple baseline on Szeged Corpus sentence boundary errorSimple regular expression: 7.0Simple regular expression7.0HunToken (this paper): 1.3HunToken (this paper)1.3
The numbers
System or settingsentence boundary error %
Simple regular expression7.0
HunToken (this paper)1.3

The test supports using HunToken to find sentences, an important prerequisite for the checksum method. It measures agreement with a reference on sentence boundaries. It does not measure duplicate detection directly. The two questions would require different reference decisions. A sentence-boundary test needs a correct segmentation of the text. A duplicate test would need judgments about which pairs of crawled pages should count as the same document.

What the spelling strata retain

The authors report corpus size by pages, tokens, types, and hapaxes. At the unfiltered setting of 100, web2 contains 3.493 million pages and 1486 million tokens. There are 19.1 million types, with 11.5 million hapaxes in the reported size breakdown. The page count describes the number of documents kept. The token count describes how much running material they contain. The type and hapax columns describe the distinct vocabulary and its low-frequency end. These quantities capture different effects of narrowing the corpus.

With the 40 cutoff, the selected collection has 3.125 million pages containing 1310 million tokens. The reported vocabulary has 15.4 million types and 8.9 million hapaxes. This setting is designed to exclude many documents with very high error percentages while preserving pages the authors regard as Hungarian in spite of unconventional spelling. The reduction in types shows that the vocabulary inventory changes as well as the amount of text. The counts alone leave open which individual items disappeared and why.

At 8, web2 has 1.918 million pages, 928 million tokens, 10.9 million types, and 6.3 million hapaxes. This is the stratum the authors refer to as the gigaword collection. It is their broader candidate for studying contemporary usage. It retains unconventional material such as computer jargon while applying a tighter restriction to spelling than the 40 setting. The authors also study the 4 stratum, which has 1.221 million pages, 589 million tokens, 7.2 million types, and 4.2 million hapaxes. Its stricter selection gives them a body of text more suited to comparison with the counts from edited literary material, although it still comes from webpages.

The spelling-error distribution is reported as strongly bimodal. Many documents have very low percentages and many have very high percentages, with relatively few in the region where about half the text is marked as erroneous. Manual inspection led the authors to conclude that the high-error group was predominantly written in other languages. The paper also examines document frequencies for the English definite article the and Hungarian definite-article forms. English article forms become less common as filtering tightens. The authors inspected some of the English occurrences that remained and found legitimate uses in Hungarian texts, such as a newspaper’s mention of The Times. These checks make the reasoning behind the filter visible. A word from another language can occur naturally in the documents the project seeks to retain.

What changed in the word rankings

The paper compares the top 20 entries by unigram document frequency from pilot0 and web2. The pilot’s leading entry is HU, with a reported document frequency of 4,516,525. The pilot broke apart web addresses and uppercased the resulting items, so the domain suffix could appear in the same counting category as the Hungarian particle hu. After the suffix was kept distinct, the particle fell outside the top 100k. The pilot list also contains items such as LISTS, DIRECTORIES, and HTML. Their prominence helps explain why the authors reviewed the pipeline before treating its output as a record of ordinary word usage.

In web2, the leading entry by document frequency is lower-case a, the Hungarian definite article, with 2,702,036. The sentence-initial A* is counted separately and has a document frequency of 2,228,939. These figures describe the number of pages in which each category occurs. A page can contain both categories. The reported figures therefore carry more information than a single count for the uppercased string, although they describe categories different from those in the pilot. The comparison shows how a reader’s interpretation of a ranking changes when the pipeline keeps case and sentence position.

The Kovács example illustrates the practical interest of that distinction. The authors report 88307 medial occurrences of the capitalized surname and 2785 medial occurrences of the lower-case common noun. They count 28,667 sentence-initial occurrences of Kovács, where the capital can go with either reading. These are occurrence counts for position and case categories. The reported contrast shows why simply assigning every capitalized form to the name would put an ambiguous category into one reading. The paper’s proposed distributional estimate could use the unambiguous counts, subject to its assumption about position.

The headword counts and the literary comparison

The paper reports text frequencies and numbers of forms for its top 15 approximate lemmas. In the 8 stratum, a has 1 counted form and a text frequency of 80,666,377. In the same stratum, van has 126 counted forms and a text frequency of 16,364,903. The form counts illustrate two ways a headword can become prominent. For a, the high count is concentrated in a single form in the grouping. For van, occurrences are pooled across a range of forms. The authors point out that the same issue affects az, which has uses as a demonstrative as well as a definite article. This is one reason to read a stem-based entry with care when a spelling participates in several functions.

The paper gives a concrete comparison between the treatment of van in the word form ranking and its treatment in the headword list. In the former, the entry for van represents the unaffixed present singular form. In the latter, the headword includes affixed forms assigned to it. Its prominence is greater in the lemma list. The change has two relevant dimensions. The unit is now a grouping of related forms, and the dictionary reports text frequency, while the earlier ranking was by document frequency. Both the event counted and the item to which the count is attached need to be specified.

The authors compare their web frequencies with FK89 by taking the log frequencies of words that occur in both sources. A logarithm reduces the scale on which large values dominate the comparison and makes proportional differences more visible. Pearson correlation then measures how closely the paired log frequencies vary together. The paper reports a correlation of 0.64 with FK89, while the spelling strata of web2 correlate with each other at 0.98 or better. The shared-word qualification matters. This comparison concerns how the common vocabulary is distributed, and it leaves out vocabulary unique to either source.

The authors attribute an important role to genre. They see FK89 as the better guide to literary frequencies despite its smaller source collection. They also argue that a web sample may be more appropriate for tasks that draw on a wider range of text, such as spelling or research in psycholinguistics, the study of how people process language. The paper presents that broader suitability as an interpretation of the coverage and comparisons. It does not report a task-based study measuring which corpus gives better results in each of these applications.

What the ablations show

The paper reports no formal ablation in which a component is removed from an otherwise fixed pipeline and the result is retested. It does provide a benchmark comparison, a comparison between pipeline versions, and a series of spelling thresholds applied to the same cleaned corpus. Each isolates a different part of the resource-building problem to a different degree.

The boundary rules as a package

The Szeged Corpus comparison puts a simple regular expression and HunToken against the same reference. The outcome gives direct evidence about the full sentence-boundary system. Its advantage belongs to the combination of rules and lexical information that the authors evaluated. The paper gives no result for HunToken with the abbreviation list disabled, or with particular rules withheld. There is consequently no measurement of which part of the boundary system contributes which share of the observed improvement.

The result is relevant to the duplicate detector because it supports one of the detector’s inputs. It is also relevant to word counts because the position marker depends on finding sentence starts. The paper does not propagate the segmentation errors through either operation. For example, an incorrect boundary could move an occurrence into a different position category, and an error that makes copied sentence text look different could affect a checksum. The benchmark shows that the full segmentation procedure agrees more frequently with the reference. How its remaining errors affect the crawl is a separate question.

The pilot ranking as a diagnosis of the inputs

The pilot and web2 rankings expose a problem that can be diagnosed by reading the high-frequency entries. HU has a plausible source in the tokenization of .hu addresses, and the paper identifies that source directly. In this case, readers can trace the highly ranked item to a counting rule and see what changes after the suffix receives separate treatment. The result illustrates why looking at a list of the most common entries can uncover a problem before a dictionary derived from them is used.

The entire ranking comparison has more moving parts. The authors changed the crawler input, page cleanup, duplicate procedure, capitalization, and tokenization. Consequently, the movement of any given entry can have several explanations. A frequency can shift because an old token is no longer produced, because it now has more than one case category, or because pages containing it have changed in number. The comparison supports the claim that construction choices matter. It gives much stronger evidence about a traceable case such as HU than about the separate effect of each change over the whole vocabulary.

What can be learned by changing the cutoff

The spelling strata offer a more controlled comparison. The underlying collection is web2, and the cutoff determines which pages from it contribute their text. A reader can see the accompanying change in the number of selected pages and the amount and variety of text. Because the same document score is reused at each cutoff, those changes describe the effect of varying that selection rule. The English article check supplies more specific evidence about language composition than the gross size figures do. The authors’ inspection of surviving English occurrences also shows why filtering every page containing such an item would eliminate acceptable material.

The correlations add a complementary analysis. The spelling strata retain highly similar frequency patterns by the reported correlation measure, even though the stricter collections contain much less text. Their scores with the literary dictionary remain lower. Tightening the spelling constraint therefore does not by itself make the frequencies resemble those of the literary collection as closely as the web subsets resemble each other. The authors’ account of genre is consistent with this outcome. The design cannot isolate genre from all the other ways in which a web corpus and an older literary dictionary differ.

The comparison of surface forms and approximate lemmas also gives a way to inspect the effect of aggregation. Words with many inflected forms can gain prominence after those forms are brought together. The paper illustrates this with particular entries and reports the forms counted for each leading headword. It does not compare the resulting dictionary against a manually disambiguated frequency list drawn from the same webpages. The evidence concerns how pooling changes the count, with the correctness of the underlying lexical assignments left open.

Limitations

Limits the authors identify

The authors explicitly frame the frequency dictionary as approximate. When HunStem proposes multiple stems, the process reported in the paper does not resolve the underlying ambiguity. A spelling that corresponds to distinct entries can also remain pooled. This matters if the reader needs the frequency of a particular meaning, instead of the frequency associated with a written stem. The authors’ nap example is a case in which even a correct analysis of the letters and affixes would leave the sense unresolved. More precise morphology is therefore part of the next step toward the fuller dictionary they describe.

The paper also gives an explicit condition on its estimate for sentence-initial uses of capitalized words. The estimate assumes that position and reading are independent. The counts in the paper show why this distinction is worth keeping, but the authors do not establish the independence condition for the name and noun they illustrate. The practical implication is that those medial counts can inform an estimate of the split at sentence starts, while the accuracy of that estimate depends on usage patterns that the counts by themselves cannot reveal.

The authors recognize the limited sensitivity of the duplicate procedure. A checksum of sentence bodies can catch repeated pages with changes around their main text. The similarity method they discuss can also detect variants in which passages have been edited or paraphrased. The cheaper checksum method makes sense for identifying the kinds of copies targeted in the pipeline, and the authors reserve the more sensitive comparison as a point of reference. Their discussion leaves open how many pages with repeated or partly repeated prose survive in web2.

Genre and text quality are further limits the authors stress. They describe the web as uneven in both the kinds of writing it contains and how closely that writing follows standard conventions. A low spelling-error percentage provides one operational definition of quality. Edited texts offer other properties, such as more controlled selection and, in the corpora used for comparison, varying amounts of manual checking. The authors’ view that FK89 better represents literary frequencies follows from this distinction. Increasing the web collection’s size or tightening its spelling filter does not change its source into a literary sample.

Limits visible in the evaluation

The size figures show throughput and the eventual amount of usable material. They do not provide precision or recall for removing duplicates. Precision would ask how many of the removed pages were genuine duplicates under a stated definition. Recall would ask how many of all genuine duplicates the procedure removed. The paper reports corpus reduction and explains which matches its rules are built to find. Without a set of labeled page pairs, it is impossible to tell from the reduction alone whether some removed pages carried distinct material or how much redundancy remained.

The boundary benchmark is similarly specific. HunToken was evaluated on the Szeged Corpus. The reported error rate applies to the comparison with that corpus’s sentences. Webpages have the kinds of layout fragments and unconventional writing that motivated the cleanup procedure in the first place. The paper does not present a separate boundary benchmark on those pages, or report where the segmentation errors fall. In particular, a count of boundary errors does not show how many occurred in page fragments whose removal could materially change a duplicate check.

The language identification evidence is descriptive. The error distribution, manual inspections, and article frequencies are all relevant to whether the filter separates much foreign text from Hungarian text. The paper gives no labeled evaluation with rates for foreign, Hungarian, and mixed-language documents at each threshold. A document can therefore pass the filter while retaining foreign sentences, especially when much of the rest of it is Hungarian. The method makes a choice about a whole page. Its score supplies no boundary between passages in different languages.

The spelling measure is also sensitive to the resources it uses. An accented form may be missing because the page’s writer used an unaccented substitute. A rejected item can also be a name, a technical expression, or a loan. The paper presents cases of Hungarian writing in which such forms occur and cases of foreign writing in which apparently Hungarian words occur. The meaning of a given percentage will therefore vary with the text. The observed separation is evidence for the authors’ Hungarian collection and the spelling resources used there. The paper offers no cross-language test of how well the same strategy generalizes.

A related question concerns representativeness. The authors regard the 8 stratum as broadly representative of contemporary Hungarian. Their evidence describes a crawl of one domain and the writing it retained after normalization, deduplication, and spelling selection. They do not compare its genre proportions with an independently sampled inventory of Hungarian usage. The procedure can favor kinds of writing that are easy to recognize as running text and that score well under the spellchecker. The resulting collection is extensive, while the frequency of a word within it is still a frequency under those collection and selection conditions.

The FK89 comparison leaves a different gap. The reported correlation concerns log frequencies of words shared by the web and literary samples. It gives no direct measure of the vocabulary that appears only in one source. It also does not resolve how much of the difference arises from genre and how much from differences in counting or lexical treatment. The web strata are nested and share their processing pipeline, so their high correlations are comparisons within a common collection. Those figures establish stability across this family of subsets, with limited bearing on how closely an independently collected Hungarian corpus would agree.

Finally, the paper provides no end-to-end validation of the approximate dictionary against manually selected headwords and meanings in the same material. The number of forms under an entry and its text frequency let a reader see the effects of pooling. They cannot establish how many tokens were assigned the right stem or how often a homonymous entry merged distinct readings. The reported work supplies the corpus, the released counts, and a path towards more detailed analysis. Questions that require frequencies by meaning still call for evidence at the level of individual occurrences.

What came after

The paper records the next stages of the project while they were still in development. The authors had created a prototype called HunMorph to extend the same open software resources into more precise morphological analysis. It could return several parses for an ambiguous form and accommodate homonymous stems. The distinction matters for the frequency dictionary. If two entries share a written stem, the analysis needs a way to represent both. The presence of multiple parses makes those possibilities available for later disambiguation. A frequency assigned to each reading would still depend on choosing among them in context.

HunMorph also allowed suffixes to be stripped in stages. The authors describe this as a way to manage the memory demands of productive suffix combinations at a cost in processing efficiency. A related project, HunLex, was being developed to prepare lexical resources offline. It would compile dictionary and affix files in the HunSpell style into resources configured for the analysis tools. The intended progression was from a corpus and approximate counts to more detailed lexical and morphological information, using tools that shared the project’s resources.

The authors also identify a companion paper on an ispell-based stemmer as an account of parts of the toolkit. Their discussion establishes a continuation of the engineering effort, with better morphological representation as the route they intended to pursue. It gives no subsequent measurements from HunMorph or HunLex and identifies no later study evaluating the resulting frequency dictionary.

Cite

Cite as Péter Halácsy, András Kornai, László Németh, András Rung, István Szakadát and Viktor Trón. 2004. Creating Open Language Resources for Hungarian. Proceedings of the Fourth International Conference on Language Resources and Evaluation (LREC'04).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{halacsy2004creating,
  title = {{Creating Open Language Resources for Hungarian}},
  author = {Péter Halácsy, András Kornai, László Németh, András Rung, István Szakadát and Viktor Trón},
  booktitle = {Proceedings of the Fourth International Conference on Language Resources and Evaluation (LREC'04)},
  year = {2004},
  url = {https://aclanthology.org/L04-1320/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/halacsy-2004-creating-open-language-resources-hungarian/