Skip to content

recognize

recognize asks a bounded question about text and returns an answered, not-sure or failed result.

Terminal window
printf '%s' 'Morgan works for Example Group.' |
thinkthen recognize --kind person --kind organization

Output

person: Morgan (0..6)	organization: Example Group (17..30)
Terminal window
thinkthen recognize --text 'Morgan works for Example Group.' \
--kind person --kind organization --json |
jq -r '
if .status == "failed" then
"failed: \(.error.code): \(.error.message)"
else .answer[] | "\(.kind) \(.text)" end'

Each name also has start, end and probability. The answer can be empty. recognize is never not sure. Without --json, recognize prints the names on one line, as person: Morgan (0..6), with tabs between them.

Options
OptionWhat it does
[FILE]...Input files; default: standard input
--name <NAME>Optional execution identity
--text <TEXT>Judge this text instead of reading input
--threshold <THRESHOLD>Required probability
--kind <KIND>Kind; repeat in order
--column <COLUMN>Field column; repeat; replaces a saved pointer
--details [=<DETAILS>]Add status, probability, error, detail and source columns
--in-place [=<IN-PLACE>]Replace source with backup
--into <INTO>Answer field for JSON Lines; column for tables
--output <OUTPUT>Destination path
--sheet <SHEET>Worksheet

Shared options