Symbol & Notation Normalizer
Overview / 概述
Provides a standards-based conversion mapping and tooling to normalize symbols and notation extracted from technical documents into canonical forms. The core asset is a machine-readable mapping (raw/recognized form → standard symbol, with Unicode codepoint, standard reference, LaTeX, and ambiguity notes), plus a batch-normalization script and an offline HTML viewer.
提供一套基于标准的转换映射与工具,将技术文档(PDF、图片、Word 等)中识别出的符号与记法规范化为标准形式。核心资产是一份机器可读的映射表(识别形式 → 标准符号,含 Unicode 码位、标准出处、LaTeX 与歧义说明),外加批量规范化脚本与一个离线 HTML 查看器。
When to use
- Cleaning up symbols after OCR / document recognition (PDF, images, Word).
- Reviewing or authoring technical documents that require correct notation per ISO/IEC/IUPAP.
- Resolving ambiguous glyphs:
U(voltage quantity) vsV(volt unit),Q(reactive power) vsΩ(ohm),⌀(diameter) vsΦ(phi),θvs0,μvsu,j(electrical imaginary unit) vsi(math). - Building or extending a notation-conversion pipeline.
Workflow
- Identify the document domain (electrical / mechanical / math / physics / general-units) before mapping — the same glyph has different meanings per domain.
- For lookup or display: open
assets/symbol_display.html(offline, searchable, filterable viewer with the full mapping), or readassets/symbol_conversion_map.jsondirectly. - For batch normalization of recognized text: run
scripts/normalize.py(see its--help). It loads the JSON and replaces unambiguous misrecognitions (symbols, units, multi-character words) while leaving risky single-letter Latin substitutions for manual/contextual handling. - Apply the global ambiguity rules (R1–R6, see
references/conversion_guide.md) for cases the script flags asambig. - When generating output (LaTeX/MathML or final document), apply font rules: variables italic, units/functions/constants upright; mark superscripts and subscripts explicitly.
Resources
scripts/normalize.py
Batch normalization CLI. Modes: normalize a file/stdin/--text, --stats for dataset counts, --lookup with optional domain filter for querying the mapping. Safe by default: only auto-replaces non-single-letter misrecognitions; reports every change with its standard reference and any ambiguity (ambig field).
references/standards_summary.md
Categorized index of the standards behind each domain (ISO 80000, IEC 60027-x, IUPAP, ISO 128/129/1101, ASME Y14.5, SI), with scope and key symbols.
references/conversion_guide.md
Conversion principles, global disambiguation rules R1–R6, per-domain notes, and a suggested post-recognition pipeline.
assets/symbol_conversion_map.json
Canonical mapping. Each entry: id, domain, raw[], standard_symbol, codepoint, standard_ref, latex, note, ambig?. This is the single source of truth for both the script and the viewer.
assets/symbol_display.html
Self-contained offline viewer (data embedded) for web/WebView display; supports search, domain filter, and URL deep-links (?domain=electrical&q=Ω).
Notes
- Always prefer the ISO 80000 series (supersedes ISO 31). For Chinese projects, GB/T equivalents apply.
- The mapping is conservative; ambiguous items are flagged rather than force-replaced. Human review is recommended for flagged cases.