Skip to main content

KhaingLens Logo

KhaingLens

Inspect. Understand. Improve.

KhaingLens is a local-first Python library and interactive visual toolkit designed for inspecting the quality of English and Burmese (Myanmar) text corpora. It helps machine learning engineers, NLP researchers, and dataset developers discover structural defects, whitespace anomalies, Unicode irregularities, and duplication without modifying or deleting original data.


Key Features

  • Python API (khainglens): Inspect .csv, .jsonl, .txt files, Pandas DataFrames, or Python lists directly in scripts and notebooks (see docs/api_reference.md).
  • Supported Formats: CSV, JSONL (JSON Lines), and TXT files, with explicit encoding validation (UTF-8 and UTF-8-BOM).
  • Malformed Record Isolation: Broken CSV rows, invalid JSON lines, and decoding errors are isolated with 1-based line numbers rather than silently dropped.
  • Burmese (Myanmar) Script Awareness: Protects valid Myanmar Unicode sequences (Kinzi, stacked consonants, medials, logical U+1031 order) while flagging genuine structural warnings (orphaned diacritics, invisible double marks, and legacy Zawgyi-One patterns).
  • Exact & Normalized Duplication: $O(N)$ exact raw-text duplicate grouping and Unicode NFC canonical normalization variant detection.
  • Interactive UI (Streamlit): Light-blue WCAG AA responsive interface featuring an Overview dashboard, Anomaly Explorer with Single-Record Inspector, Unicode Lab, Statistics & Plotly charts, Reports & Exports, and Configuration settings.
  • Export Capabilities: RFC 4180-compliant CSV reports (with UTF-8 BOM support for Microsoft Excel) and structured JSON reports.
  • Local-First Privacy: Operates entirely in local memory with zero external API calls or telemetry.

Quickstart (Python API)

import khainglens as kl

res = kl.inspect("sample_data/sample_burmese.csv")  # Inspect file, DataFrame, or list
df = kl.to_dataframe(res)                           # Convert findings to DataFrame
kl.stats(res)                                       # Print dataset statistics
kl.lab("မင်္ဂလာပါ\u200b မြန်မာစာ")                     # Inspect invisible chars & code points
kl.export(res, "report.csv")                        # Export .csv or .json report

For full command details and configuration options, see the Python API & Command Guide (docs/api_reference.md).


Interactive Visual Dashboard

Launch the visual interface via python -m streamlit run app.py or kl.launch_ui():

Dataset Overview Anomaly Explorer & Record Inspector
Overview Dashboard Anomaly Explorer
Burmese Unicode & Invisible Character Lab Dataset Statistics & Length Distributions
Unicode Lab Statistics View

Project Structure

KhaingLens/
├── app.py
├── pyproject.toml
├── requirements.txt
├── README.md
├── LICENSE
├── .gitignore
├── .streamlit/config.toml
├── assets/
├── khainglens/
├── tests/
├── sample_data/
└── docs/
    ├── api_reference.md
    ├── architecture.md
    └── issue_definitions.md

Acknowledgments

Special thanks to Khant Sint Heinn (Lead Developer at DatarrX) for critical UX testing, identifying edge cases in the Streamlit multi-page lifecycle, and providing valuable feedback on the Anomaly Explorer visual architecture and Python library design.

Project Lead & Contact

Khaing Myae Kyaw Swar Myo
Project Lead / Student

While KhaingLens was developed through an AI-assisted engineering workflow, this repository is managed, tested, and maintained independently by the project lead.

If you have questions, bug reports, or suggestions for new Burmese dataset diagnostics, please feel free to reach out:

Metadata

Release files for khainglens 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for khainglens 0.1.0
File Size Uploaded Provenance
khainglens-0.1.0.tar.gz 54.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for khainglens 0.1.0
File Interpreter ABI Platform
khainglens-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 96.5 kB

Release files / khainglens-0.1.0.tar.gz

Download URL khainglens-0.1.0.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bd8b26a60a3fe75a12c10ac356486364788ccdbb12ec7bb26d0558879b181752
BLAKE2b-256 checksum
How to use checksums
1fe8cf96d188ff42a10cdcf081fbe224b35b11770eac4623673cff1ae926f194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / khainglens-0.1.0-py3-none-any.whl

Download URL khainglens-0.1.0-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1be102a0646161344f30cd3901adf7fd5584335bb93db1aa5cc9f9c2710427a7
BLAKE2b-256 checksum
How to use checksums
44d5addd9e4a30e07031584335655d432ee8b576c967a75eb57abce814e183ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for khainglens 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page