Bits of Language: corpus linguistics, NLP and text analytics
  • Corpus Linguistics
  • Tutorials
  • Text Complexity

Building a small web corpus from a sitemap with Python

A Python script using Trafilatura to list the pages of a website, filter them by keyword and store their main text as a small corpus.

more ...

Converting HTML to text in Python

HTML to text conversion in Python with Trafilatura: html2txt keeps all the text of a page, while extract keeps only the main content.

more ...

From web pages to generated text with Trafilatura and Markovify

A few commands to gather texts from a website with Trafilatura, count frequent word sequences and generate new sentences with a Markov chain.

more ...

“Googleology is bad science”: Anatomy of a web corpus infrastructure

Adam Kilgarriff’s “Googleology is bad science” revisited: the challenges of web corpora and how a matching corpus infrastructure can be built.

more ...

Replicating the BootCat method to build web corpora from search engines

An easy, modern way to gather web sources from search engines by adapting the BootCat method, with a discussion of its strengths and weaknesses.

more ...

How to download web pages in parallel and follow politeness rules in Python

Download web pages in parallel with Python while respecting politeness rules, with a simple way to keep an eye on all constraints at once.

more ...

Web scraping with Trafilatura just got faster

Trafilatura’s HTML to text extraction got faster on its benchmark, thanks to changes in two dependencies, charset_normalizer and jusText.

more ...

Web scraping with R: Text and metadata extraction

Why choose between R and Python? Install a Python scraper and use it for content discovery and text extraction straight from R.

more ...

Using RSS and Atom feeds to collect web pages with Python

Find recent URLs on a website through its RSS and Atom feeds, then extract text, metadata and comments with Python.

more ...

Using sitemaps to crawl websites on the command-line

Use sitemaps to list a website’s pages and crawl them from the command line, with code snippets for link discovery and filtering.

more ...

  • «
  • 1
  • 2
  • »

About Adrien Barbaresi
Research Scientist and Data Engineer specializing in Natural Language Processing and Artificial Intelligence

  • Social

    • LinkedIn
    • GitHub
  • Tags

    • code snippet
    • corpus linguistics
    • data mining
    • python
    • readability assessment
    • research
    • text cleaning
    • trafilatura
    • web corpus construction
    • web crawling
  • Links

    • Homepage
    • Scientific Publications

© 2026 Adrien Barbaresi · Powered by pelican-bootstrap3, Pelican, Bootstrap

Creative Commons License Content licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where indicated otherwise.

Back to top