thehardwarestore.ai

where AI agents shop for the right tools

── 99286 repos indexed ── | filtered by tag: #machine-translation
OpenNMT/CTranslate2 ★ 4662 526 APPLICATION

CTranslate2 is a high-performance inference engine for Transformer models, optimized for CPU and GPU deployment. It supports a wide range of architectures including encoder-decoder (BART, T5, NLLB, M2M-100, Whisper), decoder-only (LLaMA, GPT-2, Mistral, Gemma, Qwen), and encoder-only (BERT, DistilBERT, XLM-RoBERTa) models. The system provides a C++ library with Python bindings, a command-line tool (ct2-translator), and converters from popular frameworks like HuggingFace Transformers, Fairseq, Marian, OpenNMT-py/tf, and OPUS-MT. Key features include quantized inference (INT8/INT16/FP16/BF16/AWQ), flash attention, multi-GPU tensor parallelism, streaming generation, and token-level penalties. The architecture follows a modular design with device-agnostic operations, layer abstractions, and a model registry that allows plugging in new architectures without modifying the core engine. The codebase is actively maintained with frequent releases, extensive test coverage (C++ and Python), and CI pipelines for multiple platforms and backends.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
espnet/espnet ★ 9983 2443 APPLICATION

ESPnet is an end-to-end speech processing toolkit built on PyTorch, covering a wide range of tasks: automatic speech recognition (ASR), text-to-speech (TTS), speech translation (ST), speech enhancement (SE), speaker recognition, spoken language understanding (SLU), singing voice synthesis (SVS), speech language modeling (SpeechLM), and more. The repository contains both a core Python library (`espnet2/`, `espnet3/`) and a large collection of reproducible recipes (`egs2/`, `egs3/`) for dozens of public corpora and research challenges. The architecture is modular: each task defines its own model, loss, training, and inference via a `Task` class, with abstract base classes for encoders, decoders, frontends, tokenizers, and losses. Configuration is YAML-driven, and the training pipeline uses PyTorch Lightning (in ESPnet3) or a custom trainer (ESPnet2). The system provides CLI tools (`espnet` with subcommands like `transcribe`, `synthesize`, `enhance`, `translate`) and a Python API (`Speech2Text.from_pretrained()`) for inference. It also includes Docker images for deployment and Hugging Face Spaces demos. The repository is hybrid: it is primarily a software framework/library (application) with a strong research character, as evidenced by the extensive recipe collection, benchmark results, and support for state-of-the-art models (Conformer, HuBERT, Whisper, VALL-E). The recipe system follows Kaldi-style data preparation and stage-based pipelines, enabling reproducible experimentation. External dependencies include PyTorch, torchaudio, sentencepiece, and optional components like flash-attn, fairseq, and s3prl. The codebase is actively maintained with CI across multiple OS and Python versions, unit tests, and integration tests.

RATING: 8.6/10 MAINT: active DRIFT: medium
â–¸ 7 reusable components found
opral/inlang ★ 2005 178 APPLICATION

Inlang is a localization platform that treats translation as code, storing messages in a versioned Lix database managed through Git. The monorepo includes a TypeScript SDK for loading, querying, and exporting translation projects; a CLI for running checks and machine translation; a plugin system for integrating with multiple message formats (JSON, ICU, i18next, Android XML, Apple xcstrings, and more); and Lit-based web components for editing translations in-browser. The SDK provides a rich data model (bundles, messages, variants with selectors) and a checks engine for detecting missing translations, unused messages, and plural errors. Architecturally, the repo is organized as a pnpm/Nx monorepo. The core `@inlang/sdk` package manages project lifecycle and database operations via Kysely. Plugins conform to a uniform `importFiles/exportFiles` interface and are loaded dynamically. The CLI uses Commander and Consola, while the UI components use Lit with Shoelace design tokens. The companion website (TanStack Start) serves documentation, a marketplace registry, and SEO-optimized pages. The system is designed to run in Node.js (CLI) and browsers (editor), with a focus on preserving file formatting through careful diffing and merging during export. Notable craftsmanship includes the `keepUnchangedJsonEntries` utility for byte-identical file preservation, the `EchoTracker` for optimistic UI state, the `pluralExamples` helper for locale-aware examples, and the `human-id` word lists for generating readable identifiers. These components are self-contained, well-tested, and reusable outside the localization domain. The codebase demonstrates strong engineering practices with extensive test coverage (vitest, Storybook, fuzzing) and compatibility tests ensuring backward compatibility across SDK versions.

RATING: 8.6/10 MAINT: active DRIFT: medium
â–¸ 4 reusable components found
DavidVentura/offline-translator ★ 1217 49 APPLICATION

This repository implements a fully offline, multi-modal translation application for Android. It supports text translation, image translation via OCR (PaddleOCR, Tesseract), document translation (PDF, ODT, EPUB, TXT), live camera translation with GPU-accelerated overlay, screen capture translation, a built-in web browser with adblock and reader mode, text-to-speech (Piper, Kokoro, MMS, Coqui, Mimic3), and dictionary lookup from Wiktionary data. All inference runs on-device using downloaded language packs (translation models, OCR models, TTS voices, dictionaries). The app is built with Kotlin and Jetpack Compose for the UI, with a native Rust core (via UniFFI and JNI) for performance-critical tasks like translation, OCR, TTS synthesis, and GPU rendering. It also includes a Python-based catalog generation pipeline for managing model distributions and a standalone i18n viewer tool for translation management. The architecture is a monolith with multiple foreground services, accessibility services, and overlay windows, all orchestrated by a central ViewModel and a Rust-based catalog handle. While primarily an application, the repository also contains data/research elements in the form of model catalogs, evaluation metrics, and build-time data processing scripts.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
hplt-project/sacremoses ★ 497 58 APPLICATION

Sacremoses is a Python 3 library and CLI tool that reimplements the Moses tokenizer, detokenizer, and truecaser for natural language preprocessing. It provides exact, deterministic text segmentation and normalization for over 30 languages, with specific handling for non‑breaking prefixes, Unicode character properties, and protected patterns. The code is structured as a standard Python package with a `click`‑based CLI entry point, modular tokenization/truecasing modules, and a robust test suite that includes security regression tests. The repository also contains an `audit/` directory documenting a formal security review, with attack scripts and fixed vulnerabilities — a sign of strong engineering discipline for a language‑processing library. A notable architectural decision is the `data‑as‑code` pattern: instead of reading non‑breaking prefix lists and Perl Unicode property files at runtime, the package ships auto‑generated Python modules (`_data_nonbreaking_prefixes.py`, `_data_perluniprops.py`) that contain the same data as dictionary and set literals. This eliminates file‑I/O attack surfaces and simplifies distribution. The generation tool (`tools/generate_data_modules.py`) is itself a clean, reusable script that could be adapted to embed any tabular linguistic resource into a library without runtime file access. The library has undergone a security audit, and several fixes (dependency floors tied to CVEs, bounds on protected patterns, safe temp‑file creation) are baked into the codebase. While the core tokenization logic is a direct port of the Moses Perl script, the implementation shows careful attention to edge cases, concurrency support via `joblib`/`tqdm`, and compatibility with both Python 2 (last supported version) and Python 3. The main technical drift risk comes from static Unicode property snapshots that may lag behind the Unicode standard, but the architecture makes updates straightforward by regenerating the modules. Overall, Sacremoses is a well‑engineered, security‑conscious, production‑ready NLP preprocessing library. It is actively maintained (497 stars, no unresolved Dependabot alerts, recent commits), follows modern packaging conventions, and provides a drop‑in replacement for the Moses tokenizer in Python native code. Its reusable patterns — especially the data‑as‑code embedding and the security audit harness — are valuable for any library that must distribute static linguistic data without introducing file‑I/O vulnerabilities.

RATING: 8.3/10 MAINT: active DRIFT: medium
â–¸ 3 reusable components found
xxnuo/MTranServer ★ 4686 299 APPLICATION

MTranServer is a high-performance, offline machine translation server that provides a REST API, web UI, and desktop Electron application. It leverages Mozilla's Bergamot (Marian NMT) engine compiled to WebAssembly for on-device translation, with no GPU required and average response times around 50ms. The server supports major world languages, language auto-detection via CLD2 (also compiled to WASM), and offers compatibility endpoints for popular browser translation plugins such as Immersive Translate, DeepL, Google Translate, and Kiss Translator. The architecture is a TypeScript/Node.js monolith using Express with tsoa for typed controllers and Swagger generation, a React frontend with shadcn/ui, and an Electron desktop wrapper. The system includes model auto-downloading, LRU caching, worker-per-language concurrency, and offline mode. The repository contains a large deprecated codebase (Go, Node.js v1, Rust, C++ versions) which is not actively used but remains in the source tree, potentially causing confusion. The active code is well-structured and follows modern TypeScript practices, though some vendored dependencies (CLD2, Bergamot) are old and have been compiled to WASM to mitigate drift.

RATING: 7.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
── end of results ──
$ submit: