You are previewing Web Corpus Construction.
O'Reilly logo
Web Corpus Construction

Book Description

The World Wide Web constitutes the largest existing source of texts written in a great variety of languages. A feasible and sound way of exploiting this data for linguistic research is to compile a static corpus for a given language. There are several adavantages of this approach: (i) Working with such corpora obviates the problems encountered when using Internet search engines in quantitative linguistic research (such as non-transparent ranking algorithms). (ii) Creating a corpus from web data is virtually free. (iii) The size of corpora compiled from the WWW may exceed by several orders of magnitudes the size of language resources offered elsewhere. (iv) The data is locally available to the user, and it can be linguistically post-processed and queried with the tools preferred by her/him. This book addresses the main practical tasks in the creation of web corpora up to giga-token size. Among these tasks are the sampling process (i.e., web crawling) and the usual cleanups including boilerplate removal and removal of duplicated content. Linguistic processing and problems with linguistic processing coming from the different kinds of noise in web corpora are also covered. Finally, the authors show how web corpora can be evaluated and compared to other corpora (such as traditionally compiled corpora). For additional material please visit the companion website: sites.morganclaypool.com/wcc Table of Contents: Preface / Acknowledgments / Web Corpora / Data Collection / Post-Processing / Linguistic Processing / Corpus Evaluation and Comparison / Bibliography / Authors' Biographies

Table of Contents

  1. Cover
  2. Copyright
  3. Title Page
  4. Contents
  5. Preface
  6. Acknowledgments
  7. 1 Web Corpora
  8. 2 Data Collection
    1. 2.1 Introduction
    2. 2.2 The Structure of the Web
      1. 2.2.1 General Properties
      2. 2.2.2 Accessibility and Stability of Web pages
      3. 2.2.3 What’s in a (National) Top Level Domain?
      4. 2.2.4 Problematic Segments of the Web
    3. 2.3 Crawling Basics
      1. 2.3.1 Introduction
      2. 2.3.2 Corpus Construction From Search Engine Results
      3. 2.3.3 Crawlers and Crawler Performance
      4. 2.3.4 Configuration Details and Politeness
      5. 2.3.5 Seed URL Generation
    4. 2.4 More on Crawling Strategies
      1. 2.4.1 Introduction
      2. 2.4.2 Biases and the PageRank
      3. 2.4.3 Focused Crawling
  9. 3 Post-Processing
    1. 3.1 Introduction
    2. 3.2 Basic Cleanups
      1. 3.2.1 HTML stripping
      2. 3.2.2 Character References and Entities
      3. 3.2.3 Character Sets and Conversion
      4. 3.2.4 Further Normalization
    3. 3.3 Boilerplate Removal
      1. 3.3.1 Introduction to Boilerplate
      2. 3.3.2 Feature Extraction
      3. 3.3.3 Choice of the Machine Learning Method
    4. 3.4 Language Identification
    5. 3.5 Duplicate Detection
      1. 3.5.1 Types of Duplication
      2. 3.5.2 Perfect Duplicates and Hashing
      3. 3.5.3 Near Duplicates, Jaccard Coefficients, and Shingling
  10. 4 Linguistic Processing
    1. 4.1 Introduction
    2. 4.2 Basics of Tokenization, Part-Of-Speech Tagging, and Lemmatization
      1. 4.2.1 Tokenization
      2. 4.2.2 Part-Of-Speech Tagging
      3. 4.2.3 Lemmatization
    3. 4.3 Linguistic Post-Processing of Noisy Data
      1. 4.3.1 Introduction
      2. 4.3.2 Treatment of Noisy Data
    4. 4.4 Tokenizing Web Texts
      1. 4.4.1 Example: Missing Whitespace
      2. 4.4.2 Example: Emoticons
    5. 4.5 POS Tagging and Lemmatization of Web Texts
      1. 4.5.1 Tracing Back Errors in POS Tagging
    6. 4.6 Orthographic Normalization
    7. 4.7 Software for Linguistic Post-Processing
  11. 5 Corpus Evaluation and Comparison
    1. 5.1 Introduction
    2. 5.2 Rough Quality Check
      1. 5.2.1 Word and Sentence Lengths
      2. 5.2.2 Duplication
    3. 5.3 Measuring Corpus Similarity
      1. 5.3.1 Inspecting Frequency Lists
      2. 5.3.2 Hypothesis Testing with χ2
      3. 5.3.3 Hypothesis Testing with Spearman’s Rank Correlation
      4. 5.3.4 Using Test Statistics without Hypothesis Testing
    4. 5.4 Comparing Keywords
      1. 5.4.1 Keyword Extraction with χ2
      2. 5.4.2 Keyword Extraction Using the Ratio of Relative Frequencies
      3. 5.4.3 Variants and Refinements
    5. 5.5 Extrinsic Evaluation
    6. 5.6 Corpus Composition
      1. 5.6.1 Estimating Corpus Composition
      2. 5.6.2 Measuring Corpus Composition
      3. 5.6.3 Interpreting Corpus Composition
    7. 5.7 Summary
  12. Bibliography
  13. Authors’ Biographies