file · Command reference

qzx getHumanLanguageStats

What it does

Analyzes files to determine the percentage of text in different languages. Improved version using centralized file finder.

Canonical command: getHumanLanguageStats

Accepted aliases: getHumanLanguageStatsFromFile

Case-sensitive: no

Included in the published package

Available in PyPI 0.2.2.0.2. This page documents the 0.2.2.0.2 alpha development checkout.

Safety and effects

Read-only under the current classification

No documented dry-run parameter

No native program invocation in the current classification

No documented network use

No inherent elevation requirement

This safety classification was reviewed against implementation digest sha256:f8e37360b5d982020bdb6b2d02970d61622f830f2cad2de6c2f4fbcd50278ac6 on 2026-07-24.

Exact syntax

qzx getHumanLanguageStats <file_path> [ignore_comments] [min_word_length] [languages] [recursive] [show_files_match] --json

Parameters

NameTypeRequiredDefaultDescription
file_pathstrYesNot declaredPath to the file(s) to analyze. Supports wildcards like *.txt
ignore_commentsboolNofalseWhether to ignore code comments when analyzing text. Can use -i or --ignore-comments flag.
min_word_lengthintNo4Minimum length of words to consider for language detection
languagesstrNoNot declaredComma-separated list of languages to detect (default: all available)
recursiveboolNofalseWhether to search recursively in directories. Can use -r, -R, or --recursive flag.
show_files_matchboolNofalseWhether to show the list of files found. Can use --show_files_match flag.

Input examples

qzx getHumanLanguageStatsFromFile myfile.txt

Analyze language distribution in a text file

qzx getHumanLanguageStatsFromFile code.py -i

Analyze a Python file, ignoring code comments using flag

qzx getHumanLanguageStatsFromFile "*.md" false 3

Analyze all Markdown files in current directory

qzx getHumanLanguageStatsFromFile "docs/*.txt" -i

Analyze text files in docs directory, ignoring comments

qzx getHumanLanguageStatsFromFile "src/**/*.py" -r

Analyze all Python files recursively in src directory using -r flag

qzx getHumanLanguageStatsFromFile "**/*.py" -r -i

Analyze all Python files recursively, ignoring comments, using flags

qzx getHumanLanguageStatsFromFile "**/*.py" -r --show_files_match

Analyze all Python files recursively and show the list of files found

For the complete structured payload, add --json: qzx getHumanLanguageStats <file_path> [ignore_comments] [min_word_length] [languages] [recursive] [show_files_match] --json

Representative output example

This illustrative JSON is derived from the current implementation-backed result contract. It shows what the command can return without claiming a recorded execution; values vary with inputs, host, permissions, and optional tools.

Example command: 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"
}
View the JSON result contract
{
    "$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
}

Errors and limits

The public contract requires success=false and a descriptive message on failure. This catalog does not yet declare a command-specific error taxonomy; inspect the result and do not invent error codes.

QZX is alpha software. Optional dependencies, permissions, and host capabilities can change the result.

Evidence workflow: ready for deterministic automated capture.

Evidence and provenance

Tests
No command-specific test file with the same module name was found; this does not prove that all coverage is absent.
Documentation channel
Development documentation 0.2.2.0.2 · main · sha256:319b16857a87636ebc3b89734cc040a737bb56194464fca33ce73bdae2043096
Availability
0.2.2.0.2 or earlier

Keep exploring

These commands also belong to the file category. Compare them to choose the operation that best fits your task.

Explore all QZX commands