humanizer-id 2.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ """Humanizer ID: mesin editorial bahasa Indonesia berbasis 465 kaidah preskriptif."""
2
+
3
+ __version__ = "2.3.0"
4
+
5
+ from .audit import audit_text # noqa: F401
6
+ from .engine import fix_text # noqa: F401
7
+ from .report import tulis_laporan, render_laporan, klasifikasi_prioritas # noqa: F401
humanizer_id/audit.py ADDED
@@ -0,0 +1,17 @@
1
+ """Public API: muat dataset dan audit teks."""
2
+
3
+ import json
4
+ import os
5
+
6
+ from .matchers import match_custom_rules # noqa: F401
7
+ from .engine import audit_text, _resolve_data_dir, fix_text # noqa: F401
8
+
9
+
10
+ def load_default_data():
11
+ """Muat dataset kaidah & glosarium yang dibundel dalam paket (fail-closed)."""
12
+ data_dir = _resolve_data_dir()
13
+ with open(os.path.join(data_dir, "kalke-indonesia.json"), encoding="utf-8") as f:
14
+ kalke = json.load(f)
15
+ with open(os.path.join(data_dir, "glosarium-lintas-bidang.json"), encoding="utf-8") as f:
16
+ glos = json.load(f)
17
+ return kalke, glos
humanizer_id/cli.py ADDED
@@ -0,0 +1,20 @@
1
+ """CLI entrypoint untuk perintah `humanizer-id`."""
2
+
3
+ import sys
4
+ import os
5
+
6
+ from .engine import load_data, main as engine_main
7
+
8
+
9
+ def main():
10
+ # Delegasikan seluruh argumen ke CLI engine asli (sudut perilaku identik)
11
+ # engine.main membaca sys.argv[1:] sendiri
12
+ if len(sys.argv) >= 2 and sys.argv[1] in ("-v", "--version"):
13
+ from . import __version__
14
+ print(f"humanizer-id v{__version__}")
15
+ sys.exit(0)
16
+ engine_main()
17
+
18
+
19
+ if __name__ == "__main__":
20
+ main()