Intermediate level · Module 1 of 8 · 12 guided hours
Advanced Text Preprocessing
Production-quality preprocessing: extracting text from HTML and documents, robust regex pipelines, reusable modules, and a dedicated topic on low-resource NLP covering data collection, normalisation of spelling variation and documentation.
Learning objectives
- Extract clean text from web pages and documents responsibly
- Build reusable, tested preprocessing modules
- Plan data collection and normalisation for a low-resource language
Topics
- HTML text extraction with BeautifulSoup
- scraping ethics, terms and robots.txt
- reusable preprocessing modules
- n-gram-friendly cleaning
- low-resource NLP: data, normalisation, documentation
- language-specific evaluation and bias
Lessons
-
Lesson 1 Extracting Text from Web Pages and Documents
Learners use requests and BeautifulSoup to extract article text from saved HTML pages, and learn the rules for collecting web text responsibly.
HTML structureBeautifulSoupfind_all / selectterms of use and robots.txtrate limiting
-
Lesson 2 Building a Reusable Preprocessing Module
Learners move cleaning code out of notebooks into a tested Python module, so that every experiment and the final system preprocess text identically.
module (.py file)function parameterssimple tests with assertconfigurable stepsconsistency between training and use
-
Lesson 3 Low-Resource NLP: Data, Normalisation and Evaluation
A dedicated lesson on low-resource languages: what makes a language low-resource, how to collect and document data with consent, how to normalise spelling variation, and how to evaluate fairly by language.
low-resource languageconsent and community ownershiporthographic variationdatasheetper-language evaluation
Practical activity
Build the project's collection and preprocessing layer: extract and record local public documents under the collection rules, package the preprocessing module, and write the low-resource data plan and corpus datasheet.
Expected outcomes
- Responsible, reusable preprocessing
- A documented, ethical approach to low-resource data
Assessment
Code review of the module and tests (50%) and the low-resource data plan with datasheet (50%).
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.