Install
infermap[postgres], infermap[mysql], infermap[duckdb], infermap[all]. The TypeScript package requires Node 20+ and is edge-runtime compatible.
Quickstart
Key features
- 7 built-in scorers: exact, alias, initialism, pattern-type, profile, fuzzy-name, and LLM (pluggable).
- Optimal 1:1 assignment via the Hungarian algorithm.
- Common-prefix canonicalization that strips schema-wide prefixes (for example
prospect_CityversusCity). - Confidence calibration (identity, isotonic, or Platt) into probabilities.
- Domain dictionaries for healthcare, finance, and ecommerce.
- Custom scorers via the
@infermap.scorerdecorator (Python) ordefineScorer()(TypeScript). - Many input formats: CSV, JSON, in-memory records, database tables, and schema definition files.
- Edge-runtime compatible and zero-dependency in the TypeScript core.
- Accuracy benchmark: 162 test cases, F1 0.84 (Python); TypeScript parity within 0.0005.
CLI
| Command | Purpose |
|---|---|
infermap map <source> <target> | Map two files or schemas and print a report. |
infermap apply <source> --config <mapping> --output <file> | Apply a saved mapping to rename columns. |
infermap inspect <source> | Extract and display a schema from a file or DB table. |
infermap validate <source> --config <mapping> --required <fields> --strict | Validate a saved config against a source. |
Custom scorer
Default scorer weights
| Scorer | Weight |
|---|---|
| ExactScorer | 1.0 |
| AliasScorer | 0.95 |
| LLMScorer | 0.8 (pluggable, stubbed by default) |
| InitialismScorer | 0.75 |
| PatternTypeScorer | 0.7 |
| ProfileScorer | 0.5 |
| FuzzyNameScorer | 0.4 |