MeridianMERIDIAN

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

FlagTypeDefaultDescription
-i, --inputstringSingle text input to classify
-f, --filepathFile containing inputs (one per line)
-m, --modelpathmodels/defaultModel directory
-o, --outputstringplainOutput format: plain, json, csv, markdown, arrow
--confidenceflagInclude confidence score in output
-v, --valueflagInclude the input value in output
--model-typestringchar-cnnModel type: transformer, char-cnn, tiered
--modestringrowInference mode: row or column
--sample-sizeinteger100Sample size for column mode
--benchflagPrint throughput statistics to stderr
--headerstringColumn name for header hint (column mode)
--batchflagRead JSONL from stdin (requires --mode column)
--sharp-onlyflagDisable Sense classifier (Sharpen-only pipeline)

Examples

Classify a single value

$ finetype infer -i "[email protected]" --confidence
identity.person.email	1.0000

Classify 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.9963

Classify from a file

Given a file samples.txt with one value per line:

$ finetype infer -f samples.txt -o json --confidence

Each 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.0000

Providing --header gives the model a hint from the column name, improving accuracy for ambiguous values.

Row mode vs column mode

Row modeColumn mode
InputSingle valueSet of values
Question answered"What is this value?""What type is this column?"
Header hintsNot applicableOptional via --header
Use caseExploration, debuggingProfiling, batch classification

See also

  • profile — profile an entire CSV file using column-mode inference
  • schema — export the JSON Schema for a detected type
  • Type Registry — browse all 250 semantic types

On this page