tcf-format 0.7.1__tar.gz

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.
Files changed (39) hide show
  1. tcf_format-0.7.1/.gitignore +92 -0
  2. tcf_format-0.7.1/CHANGELOG.md +297 -0
  3. tcf_format-0.7.1/CITATION.cff +36 -0
  4. tcf_format-0.7.1/LICENSE +21 -0
  5. tcf_format-0.7.1/PKG-INFO +379 -0
  6. tcf_format-0.7.1/README.md +349 -0
  7. tcf_format-0.7.1/datasets/canonical/adult-census/README.md +86 -0
  8. tcf_format-0.7.1/datasets/canonical/beijing-pm25/README.md +61 -0
  9. tcf_format-0.7.1/datasets/canonical/br-identidades/README.md +88 -0
  10. tcf_format-0.7.1/datasets/canonical/ibge-municipios/README.md +43 -0
  11. tcf_format-0.7.1/datasets/canonical/online-retail/README.md +64 -0
  12. tcf_format-0.7.1/datasets/canonical/receita-cnpj/README.md +83 -0
  13. tcf_format-0.7.1/datasets/canonical/tpch-sf001/README.md +98 -0
  14. tcf_format-0.7.1/datasets/canonical/tpch-sf01/README.md +52 -0
  15. tcf_format-0.7.1/datasets/canonical/wine-quality/README.md +61 -0
  16. tcf_format-0.7.1/hatch_build.py +76 -0
  17. tcf_format-0.7.1/pyproject.toml +88 -0
  18. tcf_format-0.7.1/src/tcf/__init__.py +106 -0
  19. tcf_format-0.7.1/src/tcf/_core/__init__.py +13 -0
  20. tcf_format-0.7.1/src/tcf/_core/detect.pyx +153 -0
  21. tcf_format-0.7.1/src/tcf/auto_cadence.py +99 -0
  22. tcf_format-0.7.1/src/tcf/auto_min_len.py +89 -0
  23. tcf_format-0.7.1/src/tcf/column_features.py +88 -0
  24. tcf_format-0.7.1/src/tcf/composicional/__init__.py +27 -0
  25. tcf_format-0.7.1/src/tcf/composicional/hcc_seqrle.py +323 -0
  26. tcf_format-0.7.1/src/tcf/composicional/syntax.py +812 -0
  27. tcf_format-0.7.1/src/tcf/core/__init__.py +19 -0
  28. tcf_format-0.7.1/src/tcf/core/online.py +225 -0
  29. tcf_format-0.7.1/src/tcf/core/syntax_base.py +67 -0
  30. tcf_format-0.7.1/src/tcf/decoder.py +104 -0
  31. tcf_format-0.7.1/src/tcf/encoder.py +240 -0
  32. tcf_format-0.7.1/src/tcf/multi.py +588 -0
  33. tcf_format-0.7.1/src/tcf/natures/__init__.py +63 -0
  34. tcf_format-0.7.1/src/tcf/natures/templated_checked.py +199 -0
  35. tcf_format-0.7.1/src/tcf/natures/templated_padded.py +125 -0
  36. tcf_format-0.7.1/src/tcf/obat_shape.py +124 -0
  37. tcf_format-0.7.1/src/tcf/pipeline.py +60 -0
  38. tcf_format-0.7.1/src/tcf/schema.py +192 -0
  39. tcf_format-0.7.1/src/tcf/side_outputs.py +51 -0
@@ -0,0 +1,92 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .venv/
8
+ venv/
9
+ *.egg
10
+
11
+ # IDE
12
+ .vscode/
13
+ .idea/
14
+ *.swp
15
+ *.swo
16
+
17
+ # Test / pytest
18
+ .pytest_cache/
19
+ htmlcov/
20
+ .coverage
21
+
22
+ # Output artifacts (generated, not source)
23
+ output/
24
+
25
+ # Scratch / profiling (regenerable; conclusoes consolidadas em docs/theory/)
26
+ tmp/
27
+
28
+ # Cython acelerador compilado (gerado; fonte versionada e' o .pyx)
29
+ src/tcf/_core/*.c
30
+ src/tcf/_core/*.pyd
31
+ src/tcf/_core/*.so
32
+ src/tcf/_core/*.html
33
+
34
+ # Experiment results (large, regenerable)
35
+ experiments/results/
36
+ experiments/scratch/
37
+ experiments/data/
38
+ experiments/images/
39
+ experiments/models_local.json
40
+ experiments/eval_plan.json
41
+
42
+ # OS
43
+ Thumbs.db
44
+ .DS_Store
45
+ output*
46
+ restored*/
47
+ *.tcf
48
+
49
+ # Archive (legacy materials kept locally for history, not for public repo)
50
+ archive/legacy_results/
51
+ archive/old_tokenizer/
52
+ archive/rascunhos/
53
+ archive/tickets_v01/
54
+ archive/v01/src/
55
+ archive/v01/tests/
56
+ # Note: archive/v01/experiments/ and archive/misc/ are tracked (referenced by docs)
57
+
58
+ # === Datasets storage (Phase 1+) ===
59
+ # Config local with user-specific paths
60
+ config/storage.json
61
+ config/*.local.json
62
+ config/.env
63
+ config/.env.*
64
+
65
+ # Fallback local storage (data-local/) — only README and .gitkeep are tracked
66
+ data-local/**
67
+ !data-local/.gitkeep
68
+ !data-local/README.md
69
+
70
+ # Raw downloaded datasets (live in data_root/external/, not in project)
71
+ # Belt-and-suspenders: if someone drops CSVs in datasets/canonical/, ignore
72
+ datasets/canonical/*/*.csv
73
+ datasets/canonical/*/*.tsv
74
+ datasets/canonical/*/*.db
75
+ datasets/canonical/*/*.parquet
76
+ datasets/canonical/*/*.jsonl
77
+
78
+ # SQLite hub and derivations (live in data_root/interim/ and processed/)
79
+ datasets/sqlite/
80
+ datasets/derivations/
81
+
82
+ # Whitelist small files we DO want to track
83
+ !datasets/canonical/*/metadata.json
84
+ !datasets/canonical/*/README.md
85
+ !datasets/canonical/*/schema.sql
86
+ !datasets/samples/**/*.csv
87
+ !datasets/samples/**/*.md
88
+ !datasets/samples/**/.gitkeep
89
+ !datasets/quality-reports/*.md
90
+ !datasets/questions/*.json
91
+
92
+ pergunta.md
@@ -0,0 +1,297 @@
1
+ # Changelog
2
+
3
+ History of TCF condensed into logical versions. For commit-level detail
4
+ see `git log`. For per-experiment timeline (v0.5) see
5
+ [`docs/workbench/_archive/DEVELOPMENT.md`](docs/workbench/_archive/DEVELOPMENT.md);
6
+ for v0.6 (atual) ver
7
+ [`experiments/lab/dirty/notas/historia-dirty-lab.md`](experiments/lab/dirty/notas/historia-dirty-lab.md).
8
+
9
+ A partir de v1.0.0 o versionamento e' **semver** com format `#TCF.6`
10
+ congelado (ADR-0017). Versoes anteriores marcavam milestones logicos
11
+ internos (sem PyPI). Date em parenteses = consolidacao do milestone.
12
+
13
+ > **Reframe 2026-06-14 (ADR-0024)**: o projeto e' **pré-1.0**. O rotulo
14
+ > "1.0.0 STABLE / format congelado" abaixo deve ser lido como um milestone
15
+ > interno, NAO um contrato de compat. Os minors do formato (`#TCF.4/.5/.6/.7`)
16
+ > sao iteracoes de dev rumo a um 1.0 solido; git reproduz versoes antigas. O
17
+ > pacote voltou pra `0.7.0`.
18
+
19
+ ---
20
+
21
+ ## 0.7.x (pré-1.0, em andamento) — `#TCF.7` default
22
+
23
+ Ciclo "perseguir bytes" (abertura do que era chamado v2.0; agora pré-1.0).
24
+ `encode(dict)` multi-col sai em `#TCF.7` por default. Single-col inalterado.
25
+
26
+ - **V2-A fallback identity** ([ADR-0022](docs/adr/0022-v2a-fallback-identity-weld.md)):
27
+ por coluna `min(tcf, raw)`, marcador `!`.
28
+ - **Header minimo** ([ADR-0023](docs/adr/0023-v2-minimal-header-weld.md)):
29
+ meta sem prefixo `# ` + ultima coluna sem size.
30
+ - **V2-B dicionario/categorico** ([ADR-0025](docs/adr/0025-v2b-dictionary-categorical-weld.md)):
31
+ 3o candidato do fallback `min(tcf, raw, v2b)`, marcador `@`. Coluna low-card
32
+ vira [tabela de unicos]+[stream de indices]. 13.9% weighted em 8 datasets reais.
33
+ - **Split estrutural** ([ADR-0026](docs/adr/0026-structural-split-weld.md)):
34
+ 4o candidato `min(tcf, raw, dict, split)`, marcador `%`. Valor estruturado
35
+ (decimal/data/datetime/id) com template uniforme vira campos (template 1x) ->
36
+ cada campo low-card cai no V2-B. **19.39% weighted** (maior lever do ciclo).
37
+ - **`sort_by` order-free** (O-FMT-02): `encode(table, sort_by="col")` reordena
38
+ linhas pela chave (decode retorna a ordem ordenada).
39
+ - **Knobs**: `fallback`/`min_header` (opt-out, default True), `min_len` (override).
40
+ - **0.7 default** ([ADR-0024](docs/adr/0024-pre-1.0-versioning-git-as-compat.md)):
41
+ baseline D17a re-pinado 322->303B (#TCF.6 legado lido pelo decoder). D1-D9=1523B
42
+ (single-col) inalterado. Suite 398 passed.
43
+ - **Fechamento do ciclo (2026-06-15)**: decisao do owner — **0.7 permanece
44
+ lossless-puro**; V2-C round e Pacote 10 (loss amplo) viram roadmap v2.0. Nome de
45
+ distribuicao = **`tcf-format`** (mantendo `import tcf`); `pyproject` `1.0.0` ->
46
+ `0.7.0` (alinha ADR-0024). [ADR-0018](docs/adr/0018-v2-format-roadmap.md) ->
47
+ `accepted` (V2-D refutado; V2-C/J/K/L defer). Higiene de tickets: 3 fases welded
48
+ fechadas + 5 parks v2.0/pos-0.7.
49
+ - **`0.7.1` — primeira release publicada no PyPI** (`tcf-format`): o **patch** e'
50
+ contador de release/correcao, desacoplado do minor do formato (`#TCF.7`) e do
51
+ comportamento (nao muda logica nem byte-output). D1-D9=1523B / D17a=303B intactos.
52
+
53
+ ---
54
+
55
+ ## 1.0.0 (2026-05-27) — **STABLE** — format #TCF.6 + API congelados
56
+
57
+ Primeira versao estavel. Decisao formal de freeze em
58
+ [ADR-0017](docs/adr/0017-format-spec-v1-frozen.md).
59
+
60
+ ### Estabilidade garantida (semver)
61
+
62
+ - **Format `#TCF.6` imutavel** ate' v2.0.0 — nenhum byte de arquivo TCF
63
+ v1 muda entre versoes 1.x.y
64
+ - **API publica congelada**: `encode`, `decode`, `SideOutputs`,
65
+ `PipelineConfig`, `build_schema`, `TableSchema`, `ColumnSchema`,
66
+ `TemplatedCheckedSpec`, `TemplatedPaddedSpec`, `SPEC_CPF`, `SPEC_CNPJ`,
67
+ `SPEC_IP` (+ deprecated `encode_table`/`decode_table`)
68
+ - **Semver**: 1.0.x bug fixes / 1.x.0 additive / 2.0.0 breaking
69
+
70
+ ### Validado
71
+
72
+ - D1-D9 sinteticos: 1523B (53.2% ratio), RT 9/9
73
+ - D17a multi-col: 322B INVARIANT (preservado em 16 ADRs)
74
+ - Real-world: Adult Census + TPC-H 9 tabelas (-33.02% weighted) + 3 UCI
75
+ novos (wine 90.9%, beijing 71.7%, online-retail 23.7%)
76
+ - Benchmark vs csv/jsonl + gzip/brotli/zstd: TCF vence 7/9 datasets
77
+ - Suite: 262 passed + 2 xfailed (test_regression_v1_baseline.py: 24
78
+ tests gate byte-canonical + API surface)
79
+
80
+ ### Bug fixes incluidos (categoria 1 — output era invalido)
81
+
82
+ - HCC seq-RLE multi-delta: marker `*N+-1,0|...` (primeiro delta negativo
83
+ double-signed) era emitido mas decoder rejeitava com `ValueError`.
84
+ Fix em `src/tcf/composicional/hcc_seqrle.py`. Descoberto em validacao
85
+ real-world wine-quality (2026-05-27). 2 testes regressao.
86
+
87
+ ### Packaging
88
+
89
+ - `pyproject.toml`: version 1.0.0; wheel empacota `src/tcf` canonical
90
+ (corrigido de `old/tcf` v0.5 stale); `requires-python = ">=3.10"`
91
+ - `src/tcf/__init__.py`: `__version__ = "1.0.0"`
92
+ - CI: gate bloqueante `test_regression_v1_baseline.py` + PYTHONHASHSEED=0
93
+ + matrix py 3.10-3.13
94
+
95
+ ### Deprecated (removido em 2.0.0)
96
+
97
+ - `encode_table(table)` → use `encode(dict)`
98
+ - `decode_table(text)` → use `decode(text)`
99
+
100
+ ---
101
+
102
+ ## v0.6 (2026-05-10 → 2026-05-27) — TCF (Tabular Compact Format) — superseded por 1.0.0
103
+
104
+ **Reset em 2026-05-10**: foco do projeto migrou de "formato textual
105
+ columnar para LLMs" (v0.5) para **algoritmo de compressao de strings
106
+ tabulares** em duas camadas. Trabalho em `experiments/lab/dirty/`
107
+ (macros M0-M14) consolidado e welded para `src/tcf/`. Estabilizado
108
+ como 1.0.0 em 2026-05-27.
109
+
110
+ ### Naming oficializado (2026-05-17, META-NAMING)
111
+
112
+ - **TCF** = **Tabular Compact Format** (projeto)
113
+ - **OBAT** = **Online Bidirectional Affix Tokenizer** (codnome `alg16`)
114
+ - **HCC** = **Hierarchical Compositional Coding** (codnome `M8.A`)
115
+
116
+ Ver `docs/algorithms/` para documentacao tecnica detalhada de cada
117
+ camada.
118
+
119
+ ### Componentes canonicos
120
+
121
+ - **OBAT** (camada 1, tokenizacao): online incremental via LCP+LCS
122
+ bidirecional. Tokens raiz: TokLit / TokRefPref / TokRefSuf.
123
+ Intocado desde M0 (exp 16 do alg16).
124
+ - **HCC** (camada 2, compactacao): detector unificado (refs atomicos
125
+ + virtuais no mesmo espaco) + emit composicional (`~` cria ref
126
+ auto-nomeado, `,` concat efemero); restricao body-order para
127
+ inline expansion correto; range `a..b` como caso particular.
128
+ - **Convencao output**: sem brackets `[`/`]`, LF only.
129
+
130
+ ### Resultados validados
131
+
132
+ - D1-D9 (stress 9 datasets sinteticos): 1615 bytes em 2981 raw =
133
+ **54.2% ratio medio**. Varia 26% (D8 cabeca-cauda) a 72% (D4 caos).
134
+ - RT 9/9 OK em todos os datasets.
135
+ - Cadeia byte-canonica: M9 → M10 → M11 → M12 → M13 → M14 (welding
136
+ validado por contra-prova).
137
+
138
+ ### Estado da API
139
+
140
+ ```python
141
+ from tcf import encode, decode # API publica v0.6
142
+
143
+ text = encode(["abc", "abcd", "abcde"])
144
+ values = decode(text)
145
+ ```
146
+
147
+ ### Phase 1 LLM (acessorio)
148
+
149
+ LLM benchmark (Q01-Q38 em `docs/findings/`) e' agora **acessorio**
150
+ ao foco. Codigo v0.5 (`old/tcf/`, antes `src/tcf/`) mantido para
151
+ referencia historica.
152
+
153
+ Ver:
154
+ - [`experiments/lab/dirty/notas/historia-dirty-lab.md`](experiments/lab/dirty/notas/historia-dirty-lab.md) — narrativa M0-M14
155
+ - [`experiments/lab/dirty/notas/roadmap-hipoteses.md`](experiments/lab/dirty/notas/roadmap-hipoteses.md) — 12 direcoes futuras
156
+ - [`docs/algorithms/`](docs/algorithms/) — OBAT, HCC, TCF-format
157
+
158
+ ---
159
+
160
+ ## v0.3-research (2026-04-27) — research-grade (HISTORICA)
161
+
162
+ **Repository reorganization**: GitHub-style README, manual with 7 chapters
163
+ (EN + 3 PT-BR), findings catalogue split by theme into `docs/findings/`,
164
+ workbench (tickets + research notes + dev/science timelines) under
165
+ `docs/workbench/`, theory snapshot under `docs/theory/`. Removed obsolete
166
+ `data/` and `data-local/` from repo root. Tickets moved from
167
+ `tickets/` to `docs/workbench/tickets/`.
168
+
169
+ **M-schema-scope finished**: F-Q37 (schema scope doesn't degrade N0;
170
+ sub-finding: models infer `Supplier#NNN` from lexical patterns even
171
+ without `supplier` table visible — TPC-H memorization caveat) and F-Q38
172
+ (schema reduced **helps** in natural wordings: -33pp in N3 between
173
+ minimal and full schemas — empirically justifies schema pruning literature).
174
+
175
+ ## v0.2.6-anthropic (2026-04-26) — Anthropic family added
176
+
177
+ `commercial_client.py` extended for Anthropic Messages API:
178
+ - haiku 4.5 + sonnet 4.6 with `thinking={"type":"enabled","budget_tokens":2048}`
179
+ - opus 4.7 with `thinking={"type":"adaptive"}` + `output_config.effort`
180
+ (different API!)
181
+ - 1968 records over 4 paradigms × 7 commercial models. Total spend
182
+ $9.46 USD with prompt caching (~75% savings).
183
+
184
+ Findings:
185
+ - **F-Q36**: Anthropic ≈ OpenAI in Linha B (96-99% Adult, 80-88% TPC-H);
186
+ OpenAI wins Linha A Adult (gpt-5.x 82-95% vs Anthropic 76-80%);
187
+ paridade in Linha A TPC-H. claude-sonnet-4-6 wins TPC-H Linha B
188
+ (88.1% > gpt-5.4 85.7%).
189
+
190
+ ## v0.2.5-openai (2026-04-26) — OpenAI commercials
191
+
192
+ Migrated `commercial_client.py` to **OpenAI Responses API** (recommended
193
+ 2026 path), added structured outputs via Pydantic, prompt caching with
194
+ `prompt_cache_key`, tiktoken-based count_tokens.
195
+
196
+ Models: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-4o-mini (control).
197
+ 1008 records (Linha A + B × Adult + TPC-H), $3.17 USD.
198
+
199
+ Findings:
200
+ - **F-Q31**: commercial reasoning models break the local Linha A ceiling
201
+ (gpt-5.4 95% vs locals capped ~57%). The discriminating axis is
202
+ REASONING, not size.
203
+ - **F-Q32**: gpt-5.4 + mini = **100% in all naturalness levels** for
204
+ Adult Linha B.
205
+ - **F-Q33**: locals lose -30 to -45pp in TPC-H Linha B with N2
206
+ wording — schema ambiguity systematic in multi-table.
207
+ - **F-Q34**: same applies to commercial top models — schema ambiguity
208
+ is universal/paradigm-independent.
209
+ - **F-Q35**: Linha A commercial in TPC-H caps at 60-76%; even
210
+ gpt-5.4 falls 21pp from Adult to TPC-H.
211
+
212
+ ## v0.2.4-naturalness (2026-04-26) — naturalness axis (locals only)
213
+
214
+ Introduced **N0..N3 naturalness taxonomy** for question wordings:
215
+ - N0: schema-aware (literal column names, technical hints)
216
+ - N1: system-aware (domain-aware prose)
217
+ - N2: business-intent (no schema mentions)
218
+ - N3: business + implicit context
219
+
220
+ Implementation: `experiments/eval/llm_eval/question_naturalness.py` with
221
+ 28 wordings × 2 datasets, runners adapted with `--naturalness` flag.
222
+ N0 byte-identical to legacy questions for backwards compat.
223
+
224
+ Findings:
225
+ - **F-Q29**: naturalness does NOT degrade Linha A in 13 local models
226
+ 0.6B-20B (delta < 5-14pp, within Wilson CI). Mechanism: arithmetic
227
+ ceiling dominates; wording is invisible below it.
228
+ - **F-Q30**: naturalness DEGRADES Linha B in locals selectively (qwen3:14b
229
+ immune; qwen2.5-coder -15pp). Two mechanisms: domain-semantic ambiguity
230
+ + hyphenated columns.
231
+
232
+ ScoringConfig dataclass added with `string_match=lenient` default
233
+ (strict still available for legacy comparability).
234
+
235
+ ## v0.2.3-canonical (2026-04-25) — canonical datasets baseline
236
+
237
+ `scripts/setup_adult.py` and `setup_tpch.py` for reproducible canonical
238
+ ingestion. `scripts/csv_to_sqlite.py` builds SQLite hubs in
239
+ `Z:/tcf-data/interim/`. Stratification metrics inline (TVD/JSD/Hellinger/
240
+ Wilson CI).
241
+
242
+ Findings:
243
+ - **F-Q24**: canonical TPC-H ≈ synthetic retail in accuracy under same
244
+ protocol — synthetic was representative.
245
+ - **F-Q25**: H-TCF2 generalizes to single-table (Adult Census) with
246
+ hyphenated columns. 100% Linha B local.
247
+ - **F-Q26**: random ≈ stratified in Adult — paradigm robust to sampling
248
+ choice ("floor effect" of 100% accuracy).
249
+ - **F-Q27**: SQL quality structural metric correlates **inversely** with
250
+ accuracy. Discarded.
251
+ - **F-Q28**: Linha A in canonical Adult = 52% bimodal (100% on full-table
252
+ agg, 0-11% on filter+agg). Refines F-Q12.
253
+
254
+ ## v0.2.2-shaper (2026-04-25) — unified data pipeline
255
+
256
+ `scripts/shaper/` framework with 7 strategies (schema_filter, join,
257
+ compressibility, stratify, fk_preserving, volume, ordering).
258
+ `experiments/eval/data_sources.py` provides single entry point
259
+ `load_dataset(source, **kwargs)` for both synthetic and canonical.
260
+
261
+ All M-runners migrated to `load_dataset` (no more direct fixture imports).
262
+
263
+ ## v0.2.1-mseries (2026-04-15..04-23) — M1..M9 experiment runs
264
+
265
+ 13 M-series runners exploring Linha B (LLM → SQL) systematically across
266
+ synthetic and canonical datasets. Findings F-Q13..F-Q23 (schema-only,
267
+ fewshot, cross-domain, format, intermediate forms, filter questions,
268
+ HAVING, complex queries, error types, style hints).
269
+
270
+ ## v0.2.0-encoder (2026-04-10..04-13) — encoder/decoder v0.2
271
+
272
+ Rewrote encoder/decoder with separated `compression.py` module.
273
+ Public API: `encode`, `encode_rows`, `decode`, `EncodeConfig`. CLI
274
+ modernized.
275
+
276
+ ## v0.1-llm-comprehension (2026-04-04..04-10) — Phase 1 LLM testing
277
+
278
+ Phase 1 ran 12 local models × 4 formats × 4 questions to test LLM
279
+ comprehension of TCF. **TCF 43% < JSONL 63%** in raw accuracy — pivot
280
+ to Linha B as the high-value path. F-Q1..F-Q12 catalogued.
281
+
282
+ ## v0.0-prototype (2026-04 first week) — initial sketch
283
+
284
+ First handcrafted draft of the columnar text format. Encoder/decoder
285
+ v0.1 written in two weeks (`src/tcf/encoder.py`, `decoder.py`).
286
+ Roundtrip CSV → TCF → CSV verified. Format had conceptual issues
287
+ (DICT with `=`, `[sorted]` confusing, redundant IDs); kept as
288
+ historical reference in `docs/archive/`.
289
+
290
+ ---
291
+
292
+ ## Roadmap (open)
293
+
294
+ - v0.3: schema_qualifier (auto-prune schema for N2/N3 wordings before LLM)
295
+ - v0.3: numeric precision (open issue 23)
296
+ - Future: TOON benchmark integration (head-to-head Adult/TPC-H)
297
+ - Future: Shaper as standalone pip package
@@ -0,0 +1,36 @@
1
+ cff-version: 1.2.0
2
+ title: "TCF — Tabular Compact Format"
3
+ message: "If you use this software, please cite it using these metadata."
4
+ type: software
5
+ authors:
6
+ - given-names: Leonardo
7
+ family-names: Marques Souza
8
+ email: leonardo.marques.souza@gmail.com
9
+ version: "0.7.1"
10
+ date-released: "2026-06-15"
11
+ repository-code: "https://github.com/LeoPR/TCF"
12
+ license: MIT
13
+ abstract: >
14
+ TCF (Tabular Compact Format) is a textual compact format for tabular
15
+ string data, with a canonical 2-layer pipeline: OBAT (Online
16
+ Bidirectional Affix Tokenizer) tokenizes via LCP+LCS matching against
17
+ previous strings; HCC (Hierarchical Compositional Coding) provides
18
+ compositional compaction with `~`/`,` operators and auto-naming.
19
+ Pre-1.0 (ADR-0024): format minors (#TCF.4/.5/.6/.7) are development
20
+ iterations toward a solid 1.0, without rigid cross-version compatibility
21
+ (git reproduces older versions). Delta-aware pipeline (auto-cadence
22
+ detection, shape-preserving OBAT hint, HCC seq-RLE near-identical
23
+ detection, auto-detect min_len), multi-column support, optional nature
24
+ specs (CPF/CNPJ/IP). Validated byte-canonical
25
+ in 9 synthetic datasets (D1-D9, 1523B; D17a multi-col 322B INVARIANT)
26
+ and real-world (Adult Census + TPC-H 9 tables, -33.02% weighted; plus
27
+ UCI wine-quality/Beijing-PM2.5/Online-Retail). Benchmarked against
28
+ csv/jsonl + gzip/brotli/zstd: TCF wins 7/9 datasets.
29
+ keywords:
30
+ - tabular-data
31
+ - compression
32
+ - string-encoding
33
+ - affix-tokenizer
34
+ - compositional-coding
35
+ - lcp-lcs
36
+ - delta-aware
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Leonardo Marques Souza
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.