Class 1: Overview, introductions, and a text investigation
Tuesday, October 6, 2026
1. NLP tasks and methods
Natural language processing (NLP) and text analysis include tasks such as these. Each kind of output requires a different check against the text.
| Task | Example output | What to check in the source |
|---|---|---|
| String search | Passages containing のぼ |
Whether the matching expression describes movement |
| Morphological analysis and word-pattern search | Word boundaries, grammatical labels, and matches across inflections | Whether the analyzed word spans fit the text |
| Extraction and text classification | Name spans or document categories | Whether the spans and labels follow the criteria |
| Topic modeling | Groups of words that tend to occur together | Whether the groups support an interpretation of the text’s topics |
Changes in NLP and software
| Resource | Excerpt and question |
|---|---|
| Andrej Karpathy: Software Is Changing (Again) (Y Combinator, 2025, English) | Watch 1:25–6:10 (4 minutes 45 seconds). Compare writing code, training a model, and instructing an LLM in words. |
| Christopher Manning: History of Natural Language Processing (Stanford CS224N, 2026, English). Course website · YouTube lectures (2024) | Slide 2, “Four eras of NLP.” Locate rule-based methods, statistical machine learning, and deep learning in the history of NLP. |
- NLP has long used models and systems tailored to individual tasks.
- General-purpose pretrained models and LLMs can handle multiple tasks.
- Each task requires clear output criteria and its own evaluation.
Optional: 3Blue1Brown on LLMs
- English original: Large Language Models Explained Briefly: 7 minutes 58 seconds
- Official Japanese version: LLMの仕組み(簡単バージョン): 7 minutes 44 seconds
2. Named entity recognition: criteria and methods
Decide where a person’s name begins and ends
田中さんは東京で夏目漱石の『こころ』を読んだ。
Tanaka read Natsume Sōseki’s Kokoro in Tokyo.
- Does the honorific
さんbelong in the extracted name田中さん? - Does mentioning Natsume Sōseki mean he is present in the scene?
Comparing rules and models requires shared criteria for name boundaries and a clear definition of what to extract.
Compare NER methods
Compare these methods for named entity recognition (NER).
| Method | Questions to investigate |
|---|---|
| String, dictionary, and rule-based search | Can you explain the result by reading the rule? Does it miss alternative spellings or contexts? |
| Fixed-category NER models (GiNZA, BERT, and RoBERTa models) | Do the training language and texts match the target text? Does the trained category set include what you want to study? |
| NER models with supplied categories (GLiNER) | Can you specify what to extract? What changes when you change the category descriptions? |
| Generative large language models (LLMs) | What changes when you change the instruction? Can you verify its quotations and explanations in the source? |
- Open the NER comparison and compare the same four paragraphs of 「蜘蛛の糸」 (“The Spider’s Thread”) using people/places, then deities/sinners/places of punishment.
- Read the category definitions and judge whether 極楽 (paradise) counts as a place name and whether it counts as a place of punishment.
Which methods can accommodate a change of categories?
3. Investigate the text and record evidence
Reading and source
- Akutagawa Ryūnosuke, 「蜘蛛の糸」: the text at Soranoha
- Soranoha’s plain text: text to search in the browser
- Soranoha’s work page: work and release information
- Aozora Bunko’s work card: edition, base text, and contributors
The card labels this version 新字新仮名 (modern character forms and kana spelling). Soranoha’s reading page displays pronunciation guides; its plain text leaves out the guides and editorial notes.
Search matches and events
Suppose a search finds 下りろ (“Descend!”). Did an actual descent happen, not happen, or is there insufficient information to tell?
Open the plain text. Use Command+F on a Mac, or Ctrl+F on Windows/Linux, to search for 下りろ. Read the surrounding passage and identify who asks whom to do what. Then revisit your initial prediction.
This expression is a command to descend. Whether the sinners it addresses actually descended is not stated. Record downward-movement expressions separately from evidence of an actual descent.
Counting units illustrated: compare string matches, labeled occurrences, and events.
Your investigation: upward and downward movement
Investigate how the story describes upward and downward movement.
- Before searching, predict one expression for upward movement and one for downward movement.
- Read the story and try your expressions in the plain text. If you need a starting point, use
のぼfor upward movement and落ちfor downward movement. - Choose one upward and one downward passage, then read their surrounding paragraphs. Record the part (一, 二, or 三), actor, short expression, and direction.
- Explain whether each passage describes actual movement, a condition, a negation, a command, or another context. If you cannot decide, record why.
- Compare one judgment with a partner. Use the table below to review your evidence or search expression.
| Your judgments | What to compare |
|---|---|
| Same judgment | Whether you used the same wording as evidence |
| Different judgments | Which wording or surrounding context explains the difference |
| Either student defers judgment | The reasons for deferring |
If you have no partner, judge the 下りろ passage yourself and compare your judgment, using the same table, with the one in “Search matches and events” (a command to descend; whether the descent happened is not stated). That judgment is one example reading.
Browser search finds the string you entered. It does not determine whether inflected forms or compound words belong to the same verb. If you get no matches, check the spelling in the text and change one search expression.
If Soranoha does not load, use this copy of the text.
Notes to bring to the next class
Keep today’s notes and bring them to the next class. There is no submission today.
| What to save | Contents |
|---|---|
| Question and prediction | A focused question the text could answer, and your prediction before searching |
| Source and search | Work URL and search expressions |
| Two source passages | Part, actor, short expression, direction, and judgment based on context |
| Revision and uncertainty | What you changed, why, and what remains unresolved |