Index / 001 EN
Quantitative Corpus Linguistics with R: A Practical Introduction cover

Linguistics

Linguistics

Quantitative Corpus Linguistics with R: A Practical Introduction

Stefan Th. Gries

A hands-on guide to doing corpus linguistics by writing your own programs in R instead of relying on ready-made concordancers. Stefan Gries teaches the programming needed to process corpus files and extract linguistic data, and then the statistical methods needed to analyse frequencies, distributions and associations in that data.

Prerequisites: An introductory corpus linguistics course; no programming experience is required, but basic statistics helps.

Difficulty Level
Advanced
Academic Level
Graduate
corpus linguisticsr programmingquantitative methodsStatisticscollocation

01 / Reading Guide

Reading Guide

Citation

Gries, S. Th. (2017). Quantitative Corpus Linguistics with R: A Practical Introduction (2nd ed.). Routledge.

Chapter Summary

The second edition has six chapters and about 270 pages of text. It is deliberately not a survey of corpus linguistics: Gries says it focuses on R programming for corpus linguists, presupposes only basic corpus-linguistic knowledge and no mathematics or programming, and is meant to be read at a computer with the code running. Compared with the first edition, Chapter 2 now includes dispersion, Chapter 3 adds a fuller Unicode section, a section on XML and a section on writing your own functions, the statistics chapter has moved from fifth to fourth place, and the case studies of Chapter 5 are new.

Chapter 1: Introduction

The chapter explains why a book on corpus linguistics should teach programming at all. The author argues that scripts give control over methodological choices, do not depend on a concordancing program's settings or developer, and handle more input and output formats, and that R is open-source and free. A section outlines the book and its learning aids: short "Think Breaks", exercise boxes with an answer key, boxes of further recommendations, and a companion website and discussion group.

Chapter 2: The Four Central Corpus-Linguistic Methods

This short conceptual chapter defines a corpus and distinguishes the kinds of corpora, then presents the four methods to which the author reduces most corpus work: frequency lists, dispersion information, lexical co-occurrence (collocations) and (lexico-)grammatical co-occurrence (concordances).

Chapter 3: An Introduction to R

The longest preparatory chapter teaches R from the ground up: data structures, functions and arguments; vectors; factors; data frames; lists; elementary programming with conditional expressions and loops; and rules of programming. A large share of its space goes to character and string processing, with and without regular expressions, followed by sections on Unicode and XML, file and directory operations, and writing your own functions.

Chapter 4: Some Basic Statistical Notions and Tests

A deliberately brief chapter introduces statistical thinking: variables and their roles, formulating and operationalising hypotheses, data analysis and significance testing. It is organised by the type of dependent variable (categorical or numeric) and the independent variables involved, and ends with reporting results.

Chapter 5: Using R in Corpus Linguistics: Case Studies

The main chapter, and the one that is new in this edition, collects more than thirty case studies in four groups: dispersion; frequencies, frequency lists and key words; co-occurrence data (collocation, colligation, collostruction); and other applications. Examples include character and word n-grams, key words, split infinitives, verb collexemes after must, type-token ratios in Hamlet and Macbeth, lexical frequency profiles and CHAT acquisition files.

Chapter 6: Next Steps . . .

A very brief conclusion pointing to R packages worth exploring next. An appendix and an index follow.

Key Concepts

Chapters 1–2: Rationale and methods

  • Scripted analysis: replacing ready-made concordancers with programs whose choices are visible and replicable.
  • Corpus, frequency list, dispersion, collocation, concordance: the vocabulary of the four central methods.

Chapter 3: R

  • Vectors, factors, data frames and lists: the data structures used throughout.
  • Regular expressions: the tool for searching and replacing in text.
  • Unicode and XML handling: working with encoded text and annotated corpora.
  • User-defined functions: packaging analyses for reuse in Chapter 5.

Chapter 4: Statistics

  • Hypotheses and significance testing: formulating and operationalising a question and checking whether a result is noteworthy.
  • Dependent and independent variables: the organising principle of the tests presented.

Chapter 5: Case studies

  • Collocation, colligation and collostruction: lexical and grammatical co-occurrence analyses.
  • Type-token ratio and lexical frequency profiles: measures of vocabulary used in the applications.

Critical Analysis

Strengths

  • Hands-on by design. The book teaches by working through small applications and larger case studies, with Think Breaks and exercise boxes with answers, and the publisher notes that the companion website holds about 7,000 lines of commented code and most data sets.
  • No prerequisites in programming or mathematics. The introductory chapter states that only basic corpus-linguistic knowledge is assumed.
  • Case-study chapter. The new Chapter 5 shows how the techniques apply to real corpus questions, using corpora such as the BNC, COCA and COHA.
  • Honest about difficulty. The introduction warns that the book cannot be read casually in bed and must be worked through at a computer.

Limitations

  • Not a survey. The author says the book does not try to survey corpus linguistics, so questions of corpus design and theory need another book.
  • Statistics are brief. Chapter 4 is described by the author as short, and readers who need statistical modelling will need a separate text; the author points to his own statistics book for linguists.
  • Tied to R and to the code files. Much of the explanation lives in the companion code, and the book's scripts assume the author's file organisation and data.

Where It Fits in the Course

This is the programming-focused member of the corpus group. McEnery and Hardie's Corpus Linguistics: Method, Theory and Practice explains how corpora are built, annotated and analysed and situates the field in its debates, and Csomay and Crawford's Doing Corpus Linguistics is a step-by-step first course using public corpora. Bird, Klein and Loper's Natural Language Processing with Python and Jurafsky and Martin's Speech and Language Processing are computational-linguistics texts, and Glass and others' Language and Computers is a non-technical introduction to language technology.

Read Gries after a first course in corpus linguistics, when the four methods are familiar and the aim is to implement them yourself. It is the natural alternative to Bird, Klein and Loper for linguists who want R rather than Python.

How to Use This Book

The book suits graduate students and researchers in linguistics who have had an introductory corpus course. Programming experience is not required, but a working computer with R and the companion files is.

A reading plan:

  • Core: Chapter 2 for terms, then Chapter 3 in full, running every example. Do the exercise boxes and check them against the answer key.
  • Next: Chapter 4 once you have your own data to test.
  • Application: Chapter 5, picking the case studies closest to your project and then adapting the code; the groups on frequencies and co-occurrence are the most generally useful.
  • Optional: the Unicode and XML sections of Chapter 3 until you meet such corpora, and Chapter 6 for later reading.