infer
Classify text input into semantic types — single values, files, or streaming batches.
Classify text into one of FineType's 240 semantic types. Use infer to explore individual values, process files of inputs, or stream column batches via JSONL.
Usage
finetype infer [OPTIONS]Options
| Flag | Type | Default | Description |
|---|---|---|---|
-i, --input | string | — | Single text input to classify |
-f, --file | path | — | File containing inputs (one per line) |
-o, --output | string | plain | Output format: plain, json, csv, markdown, arrow, json-schema |
--confidence | flag | — | Include confidence score in output |
-v, --value | flag | — | Include the input value in output |
--mode | string | row | Inference mode: row or column |
--sample-size | integer | 100 | Sample size for column mode |
--header | string | — | Column name for header hint (column mode) |
--bench | flag | — | Print throughput statistics to stderr |
Classify a single value
The bundled model is column-aware, so pass --mode column to classify a single value. The label prints first, with the confidence and sample count beneath it:
$ finetype infer -i "[email protected]" --mode column --confidence
identity.person.email
confidence: 0.9638 (1 samples)
$ finetype infer -i "192.168.1.10" --mode column --confidence
technology.internet.ip_v4
confidence: 0.9951 (1 samples)Each value gets a three-part domain.category.type label. Forget --mode column and the default model stops you, rather than guessing badly:
$ finetype infer -i "[email protected]" --confidence
Error: Multi-branch models are column-level only. Use --mode column or `finetype profile` instead.A single value carries less signal than a full column. An isolated timestamp, for instance, can read as a generic identifier — the surrounding column is what confirms the pattern. For anything beyond a quick gut-check, reach for profile.
Classify a column from a file
With --mode column, a file of values (one per line) is treated as a single column and resolved to one type. The --header hint feeds the column name to the model and sharpens ambiguous cases:
$ finetype infer -f emails.txt --mode column --header "email" --confidence
identity.person.email
confidence: 0.8280 (4 samples)Output formats
-o json emits the full classification, including the vote distribution and which disambiguation rule fired:
$ finetype infer -i "[email protected]" --mode column -o json --confidence{
"confidence": 0.9637727737426758,
"disambiguation_applied": false,
"disambiguation_rule": "multi-branch",
"label": "identity.person.email",
"samples_used": 1,
"vote_distribution": [
{
"fraction": 0.9637727737426758,
"label": "identity.person.email"
}
]
}-o csv gives a compact label,confidence,samples row, handy for piping:
$ finetype infer -i "[email protected]" --mode column -o csv --confidence -v
identity.person.email,0.9638,1Row mode
The --mode row default classifies each value independently, but it requires a row-capable model supplied via --model-type. The model that ships with FineType is column-level, so everyday use is --mode column. To profile a whole CSV in one step — every column at once — use profile.
See also
profile— profile an entire CSV file using column-mode inferencetaxonomy— browse the semantic type taxonomy- Type Registry — browse all 240 semantic types