language-detection-expert

Detect input text language using Polish entity hints and statistical analysis.

14|2|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/tbartel74/Vigil-Code --skill language-detection-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: language-detection-expert
Source: https://github.com/tbartel74/Vigil-Code/tree/main/.claude/skills/language-detection-expert
Command: npx skills add https://github.com/tbartel74/Vigil-Code --skill language-detection-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hybrid language detection algorithm for Vigil Guard v2.0.0 combining entity-based hints (Polish PESEL/NIP detection) with statistical analysis (langdetect) for accurate dual-language processing and 3-branch integration.

Core Features & Use Cases

  • Hybrid Detection: Entity hints + language stats for robust detection.
  • 3-Branch Integration: Language-aware routing to heuristic, semantic, and LLM branches.
  • PII Redaction Guidance: Informing which model to use for redaction decisions.

Quick Start

POST to /detect with text to obtain language, confidence, and detection method.

Frequently Asked Questions about language-detection-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect the language of text in a multilingual Flask application?

Language detection identifies the language of input text using statistical analysis and entity recognition. This Skill combines langdetect with Polish entity hints (PESEL/NIP patterns) to classify text and return a language label, confidence score, and detection method for routing to appropriate processing pipelines.

Can I use language detection to improve PII redaction workflows?

Yes. Language detection informs which redaction model to use by identifying the text's language first. This Skill routes multilingual data to language-aware branches—heuristic, semantic, or LLM—based on detected language and confidence, enabling more accurate PII handling across Polish and other languages.

What's the difference between statistical language detection and hybrid detection with entity hints?

Statistical detection (langdetect) analyzes character patterns; hybrid detection adds entity-based hints like Polish PESEL and NIP recognition. This Skill combines both methods, improving accuracy on short texts and multilingual content by anchoring statistical results with Polish-specific entity patterns before routing.

How does this work with Flask APIs and 3-branch pipeline integration?

The Skill exposes a POST /detect endpoint accepting text input and returning language, confidence, and detection method. These outputs route requests to one of three downstream branches (heuristic, semantic, LLM) in Vigil Guard, enabling language-aware processing at scale.

What are the requirements to run language detection in Python 3.11?

This Skill requires Python 3.11, Flask 3.0.0, and langdetect 1.0.9, plus custom Polish entity patterns for PESEL/NIP recognition. These dependencies enable hybrid detection and 3-branch routing for PII and multilingual workflows on Vigil Guard v2.0.0.

When should I not rely solely on statistical language detection?

Statistical detection struggles with short texts, code-mixed content, and language-specific identifiers. This Skill adds Polish entity recognition to handle these edge cases, but confidence scores remain lower when neither statistical nor entity signals are strong—check returned confidence before routing critical redaction tasks.