infer
Classify text input into semantic types — single values, files, or streaming batches.
Classify text into one of FineType's 250 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) |
-m, --model | path | models/default | Model directory |
-o, --output | string | plain | Output format: plain, json, csv, markdown, arrow |
--confidence | flag | — | Include confidence score in output |
-v, --value | flag | — | Include the input value in output |
--model-type | string | char-cnn | Model type: transformer, char-cnn, tiered |
--mode | string | row | Inference mode: row or column |
--sample-size | integer | 100 | Sample size for column mode |
--bench | flag | — | Print throughput statistics to stderr |
--header | string | — | Column name for header hint (column mode) |
--batch | flag | — | Read JSONL from stdin (requires --mode column) |
--sharp-only | flag | — | Disable Sense classifier (Sharpen-only pipeline) |
Examples
Classify a single value
$ finetype infer -i "[email protected]" --confidence
identity.person.email 1.0000Classify several values
$ finetype infer -i "192.168.1.10" --confidence
technology.internet.ip_v4 1.0000
$ finetype infer -i "2024-01-15T09:30:00Z" --confidence
datetime.timestamp.iso_8601 1.0000
$ finetype infer -i "not-an-email" --confidence
identity.person.username 0.9963Classify from a file
Given a file samples.txt with one value per line:
$ finetype infer -f samples.txt -o json --confidenceEach line is classified independently in row mode (the default). Row mode answers: "what is this single value?"
Column mode
Column mode classifies a set of values as a group, answering: "what type does this column contain?" This is what profile uses internally.
$ finetype infer -f column_values.txt --mode column --header "email" --confidence
identity.person.email 1.0000Providing --header gives the model a hint from the column name, improving accuracy for ambiguous values.
Row mode vs column mode
| Row mode | Column mode | |
|---|---|---|
| Input | Single value | Set of values |
| Question answered | "What is this value?" | "What type is this column?" |
| Header hints | Not applicable | Optional via --header |
| Use case | Exploration, debugging | Profiling, batch classification |
See also
profile— profile an entire CSV file using column-mode inferenceschema— export the JSON Schema for a detected type- Type Registry — browse all 250 semantic types