{"id":37076165,"url":"https://github.com/impresso/impresso-pipelines","last_synced_at":"2026-01-14T08:57:48.465Z","repository":{"id":281183127,"uuid":"944470457","full_name":"impresso/impresso-pipelines","owner":"impresso","description":"Reusable NLP pipelines: identify language, assess OCR quality, model topics, and extract news‑agency entities from any text.","archived":false,"fork":false,"pushed_at":"2025-12-02T09:41:11.000Z","size":4576,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-05T03:17:13.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/impresso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-07T11:59:59.000Z","updated_at":"2025-12-03T15:52:34.000Z","dependencies_parsed_at":"2025-03-22T14:22:54.646Z","dependency_job_id":"86614957-fdde-47bd-b8cc-eaf715a78ce8","html_url":"https://github.com/impresso/impresso-pipelines","commit_stats":null,"previous_names":["impresso/impresso-pipelines"],"tags_count":98,"template":false,"template_full_name":null,"purl":"pkg:github/impresso/impresso-pipelines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresso%2Fimpresso-pipelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresso%2Fimpresso-pipelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresso%2Fimpresso-pipelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresso%2Fimpresso-pipelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/impresso","download_url":"https://codeload.github.com/impresso/impresso-pipelines/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresso%2Fimpresso-pipelines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T08:57:47.740Z","updated_at":"2026-01-14T08:57:48.456Z","avatar_url":"https://github.com/impresso.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Package: `impresso-pipelines`\n\n[![PyPI](https://img.shields.io/pypi/v/impresso-pipelines)](https://pypi.org/project/impresso-pipelines/)\n[![Python versions](https://img.shields.io/pypi/pyversions/impresso-pipelines)](https://pypi.org/project/impresso-pipelines/)\n[![Weekly Downloads](https://img.shields.io/pypi/dm/impresso-pipelines)](https://pypi.org/project/impresso-pipelines/)\n[![Contributors](https://img.shields.io/github/contributors/impresso/impresso-pipelines)](https://github.com/impresso/impresso-pipelines/graphs/contributors)\n[![QA Workflow](https://github.com/impresso/impresso-pipelines/actions/workflows/qa.yml/badge.svg)](https://github.com/impresso/impresso-pipelines/actions/workflows/qa.yml)\n\n## Overview\n\nThis repository contains a Python package designed for modular and efficient text processing workflows. Currently, it includes the following subpackages:\n\n- **Language Identification Pipeline**: Identifies the language of input text and returns a probability score.\n- **OCR QA Pipeline**: Assesses the quality of OCR text by estimating the proportion of recognized vocabulary items (0–1), using efficient language-specific Bloom filters.\n- **LDA Topic Modeling Pipeline**: Soft clustering of input texts using LDA-based topic modeling.\n- **News Agencies Pipeline**: Extracts and ranks news agency entities from text, providing relevance scores and optional links to Wikidata.\n- **Advertisement Classifier**: Identifies advertisements in historical newspaper content using a fine-tuned XLM-RoBERTa model with rule-based features.\n- **Lucene/Solr normalization Pipeline**: Replicates Solr's language-specific text normalization to clarify how input text is tokenized and indexed in impresso.\n\n## Installation\n\n### Quick Install (with uv - recommended)\n\n[uv](https://github.com/astral-sh/uv) is an extremely fast Python package installer (10-100x faster than pip):\n\n```bash\n# Install uv\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install the package with all dependencies\nuv pip install \"impresso-pipelines[all]\"\n```\n\n### Standard Install (with pip)\n\nTo install the full package with all submodules:\n\n```bash\npip install \"impresso-pipelines[all]\"\n```\n\nThe `[all]` extra installs all dependencies required for each component.\n\n### Install Individual Modules\n\nTo install individual modules without unnecessary dependencies, use:\n\n```bash\npip install \"impresso-pipelines[langident]\"         # Language Identification\npip install \"impresso-pipelines[ocrqa]\"             # OCR QA\npip install \"impresso-pipelines[ldatopics]\"         # LDA Topics\npip install \"impresso-pipelines[newsagencies]\"      # News Agencies\npip install \"impresso-pipelines[adclassifier]\"      # Advertisement Classifier\npip install \"impresso-pipelines[solrnormalization]\" # Solr text normalization\n```\n\n### Development Setup\n\nFor contributors, we support both **uv** (faster) and **Poetry**:\n\n```bash\n# Clone the repository\ngit clone https://github.com/impresso/impresso-pipelines.git\ncd impresso-pipelines\n\n# Option 1: Using uv (recommended - 3-6x faster)\nuv sync --extra all --extra dev\n\n# Option 2: Using Poetry\npoetry install --all-extras --with dev\n\n# Or use Make (auto-detects uv or Poetry)\nmake install-dev\n```\n\nSee [UV_MIGRATION.md](UV_MIGRATION.md) for more details on using uv.\n\n## Usage\n\nEach pipeline is instantiated from a corresponding class.\n\n```python\nfrom impresso_pipelines.langident import LangIdentPipeline\nfrom impresso_pipelines.ocrqa import OCRQAPipeline\nfrom impresso_pipelines.ldatopics import LDATopicsPipeline\nfrom impresso_pipelines.newsagencies import NewsAgenciesPipeline\nfrom impresso_pipelines.adclassifier import AdClassifierPipeline\nfrom impresso_pipelines.solrnormalization import SolrNormalizationPipeline\n```\n\n## Pipeline Examples\n\nFor usage examples, refer to the individual README files:\n\n- [Langident Pipeline](README_langident.md)\n- [OCR QA Pipeline](README_ocrqa.md)\n- [LDA Topics Pipeline](README_ldatopics.md)\n- [News Agencies Pipeline](README_newsagencies.md)\n- [Advertisement Classifier](README_adclassifier.md)\n- [Solr normalization Pipeline](README_solrnormalization.md)\n\nSee also the interactive notebooks for further examples:\n\n- [langident_pipeline_demo.ipynb](https://github.com/impresso/impresso-datalab-notebooks/tree/main/annotate/langident_pipeline_demo.ipynb)\n- [ocrqa_pipeline_demo.ipynb](https://github.com/impresso/impresso-datalab-notebooks/tree/main/annotate/ocrqa_pipeline_demo.ipynb)\n- [ldatopics_pipeline_demo.ipynb](https://github.com/impresso/impresso-datalab-notebooks/tree/main/annotate/ldatopics_pipeline_demo.ipynb)\n- [newsagencies_pipeline_demo.ipynb](https://github.com/impresso/impresso-datalab-notebooks/tree/main/annotate/newsagencies_pipeline_demo.ipynb)\n- [solrnormalization_pipeline_demo.ipynb](https://github.com/impresso/impresso-datalab-notebooks/tree/main/annotate/solrnormalization_pipeline_demo.ipynb).\n\n## Future Plans\n\nAdditional functionality will be added to extend use cases and support further processing tasks.\n\n## Local Development\n\nFor contributors and developers who want to test locally before pushing to GitHub:\n\n### Quick Start\n\n```bash\n# Clone and install\ngit clone https://github.com/impresso/impresso-pipelines.git\ncd impresso-pipelines\n\n# Option 1: Poetry (recommended for full development)\nmake install-dev\n\n# Option 2: Pip editable mode (faster for testing changes)\nmake install-editable-dev\n\n# Run tests\nmake test\n\n# Run all QA checks (mimics CI)\nmake qa\n```\n\n### Available Commands\n\n```bash\nmake help              # Show all available commands\nmake install          # Install package with all extras\nmake install-dev      # Install with dev dependencies\nmake test             # Run tests (skipping JVM tests)\nmake test-all         # Run all tests including JVM tests\nmake test-ocrqa       # Run only OCRQA tests\nmake test-cov         # Run tests with coverage report\nmake lint             # Run linting checks\nmake format           # Format code with black\nmake type-check       # Run type checking\nmake qa               # Run all QA checks\nmake clean            # Remove build artifacts\n```\n\nFor detailed development instructions, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## About Impresso\n\n### Impresso project\n\n[Impresso - Media Monitoring of the Past](https://impresso-project.ch) is an interdisciplinary research project that aims to develop and consolidate tools for processing and exploring large collections of media archives across modalities, time, languages and national borders. The first project (2017-2021) was funded by the Swiss National Science Foundation under grant No. [CRSII5_173719](http://p3.snf.ch/project-173719) and the second project (2023-2027) by the SNSF under grant No. [CRSII5_213585](https://data.snf.ch/grants/grant/213585) and the Luxembourg National Research Fund under grant No. 17498891.\n\n### Copyright\n\nCopyright (C) 2025 The Impresso team.\n\n### License\n\nThis program is provided as open source under the [GNU Affero General Public License](https://github.com/impresso/impresso-pyindexation/blob/master/LICENSE) v3 or later.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/impresso/impresso.github.io/blob/master/assets/images/3x1--Yellow-Impresso-Black-on-White--transparent.png?raw=true\" width=\"350\" alt=\"Impresso Project Logo\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpresso%2Fimpresso-pipelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimpresso%2Fimpresso-pipelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpresso%2Fimpresso-pipelines/lists"}