Natural Language Processing#
These tutorials provide a hands-on introduction to analyzing text data for research, covering the full spectrum from deterministic rule-based methods to modern LLMs.
The Research Reproducibility Triad#
Before diving in, keep these principles in mind for all text analysis work:
Automate — transition from interactive notebooks to scripts designed for batch processing
Test — embed sanity checks and unit tests at every step to validate extraction accuracy
Abstract — separate core logic (your functions) from specific parameters (model versions, file paths)
Tutorial Overview#
Tutorial |
Methods Covered |
When to Use |
|---|---|---|
Regex, tokenization, stemming, POS tagging |
Pattern-based extraction; maximum reproducibility |
|
Dictionary methods, TF-IDF |
Measuring known constructs; regression inputs |
|
OpenAI, Anthropic, Google APIs |
Nuanced classification; when context matters |
|
Ollama on KLC |
Sensitive data; cost at scale; reproducibility |
|
Cohen’s Kappa, cross-validation, Gold Standard |
Validating results for academic publication |
For interpretive coding with rubrics and adjudication, see Qualitative Coding with LLMs (separate walkthrough).