archivos · Referencia de comando
qzx getHumanLanguageStats
Qué hace
Analiza archivos para estimar el porcentaje de texto en distintos idiomas.
Comando canónico: getHumanLanguageStats
Alias aceptados: getHumanLanguageStatsFromFile
Distingue mayúsculas: no
Incluido en el paquete publicado
Disponible en PyPI 0.2.2.0.2. La documentación corresponde al checkout alpha 0.2.2.0.2.
Seguridad y efectos
Solo lectura según la clasificación actual
Sin parámetro dry-run documentado
No invoca programas nativos según la clasificación
Sin uso de red documentado
No requiere elevación de forma inherente
Esta clasificación de seguridad se revisó contra el digest de implementación sha256:f8e37360b5d982020bdb6b2d02970d61622f830f2cad2de6c2f4fbcd50278ac6 el 2026-07-24.
Sintaxis exacta
qzx getHumanLanguageStats <file_path> [ignore_comments] [min_word_length] [languages] [recursive] [show_files_match] --jsonParámetros
| Nombre | Tipo | Obligatorio | Predeterminado | Descripción |
|---|---|---|---|---|
| file_path | str | Sí | No declarado | Path to the file(s) to analyze. Supports wildcards like *.txt |
| ignore_comments | bool | No | false | Whether to ignore code comments when analyzing text. Can use -i or --ignore-comments flag. |
| min_word_length | int | No | 4 | Minimum length of words to consider for language detection |
| languages | str | No | No declarado | Comma-separated list of languages to detect (default: all available) |
| recursive | bool | No | false | Whether to search recursively in directories. Can use -r, -R, or --recursive flag. |
| show_files_match | bool | No | false | Whether to show the list of files found. Can use --show_files_match flag. |
Ejemplos de entrada
qzx getHumanLanguageStatsFromFile myfile.txtAnalyze language distribution in a text file
qzx getHumanLanguageStatsFromFile code.py -iAnalyze a Python file, ignoring code comments using flag
qzx getHumanLanguageStatsFromFile "*.md" false 3Analyze all Markdown files in current directory
qzx getHumanLanguageStatsFromFile "docs/*.txt" -iAnalyze text files in docs directory, ignoring comments
qzx getHumanLanguageStatsFromFile "src/**/*.py" -rAnalyze all Python files recursively in src directory using -r flag
qzx getHumanLanguageStatsFromFile "**/*.py" -r -iAnalyze all Python files recursively, ignoring comments, using flags
qzx getHumanLanguageStatsFromFile "**/*.py" -r --show_files_matchAnalyze all Python files recursively and show the list of files found
Para obtener la carga estructurada completa, añade --json: qzx getHumanLanguageStats <file_path> [ignore_comments] [min_word_length] [languages] [recursive] [show_files_match] --json
Ejemplo de salida representativa
Este JSON ilustrativo deriva del contrato de resultado respaldado por la implementación actual. Muestra lo que el comando puede devolver sin afirmar que es una ejecución grabada; los valores varían según entradas, equipo, permisos y herramientas opcionales.
Comando del ejemplo: qzx getHumanLanguageStatsFromFile myfile.txt --json
{
"success": true,
"message": "Analyzes files to determine the percentage of text in different languages. Improved version using centralized file finder. In this illustrative example, the command completed successfully.",
"aggregated_stats": [
{
"name": "example",
"status": "ok"
}
],
"file_stats": [
{
"path": "README.md",
"language": "English",
"confidence_percent": 98.4
}
],
"files_found": "C:\\project\\example.txt",
"files_processed": "C:\\project\\example.txt",
"status": "ok"
}Ver el contrato de resultado JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"success",
"message"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"aggregated_stats": [],
"error": {
"type": "string"
},
"file_stats": [],
"files_found": [],
"files_processed": [],
"status": {
"type": "string"
}
},
"additionalProperties": true
}Errores y límites
El contrato público exige success=false y un message descriptivo en fallos. Este catálogo aún no declara una taxonomía de errores específica para cada comando; revisa el resultado y no infieras códigos inexistentes.
QZX está en alpha. Dependencias opcionales, permisos y capacidades del host pueden cambiar el resultado.
Flujo de evidencia: lista para captura automática determinista.
Evidencia y procedencia
- Implementación
- src/qzx/commands/file/get_human_language_stats.py
- Pruebas
- No se encontró un archivo de prueba específico con el mismo nombre de módulo; esto no demuestra ausencia total de cobertura.
- Canal de documentación
- Documentación de desarrollo 0.2.2.0.2 · main · sha256:319b16857a87636ebc3b89734cc040a737bb56194464fca33ce73bdae2043096
- Disponibilidad
- 0.2.2.0.2 o anterior
Sigue explorando
Comandos relacionados
Estos comandos también pertenecen a la categoría de archivos. Compáralos para elegir la operación que mejor resuelva tu tarea.
qzx getFileHashCalcula hashes criptográficos MD5, SHA-1 y SHA-256 de un archivo.qzx getProgrammingLanguageStatsAnaliza archivos para determinar lenguajes de programación y estadísticas del código.qzx findTextBusca patrones de texto en archivos con filtros avanzados.qzx inspectImageInspecciona dimensiones, formato y tamaño desde las cabeceras de PNG, JPEG, GIF y BMP.