Skip to content

score

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

Terminal window
printf '%s' 'Please refund my order.' |
thinkthen score --level routine --level urgent \
'How urgent is the request?'

Output

0.05

Levels name a scale, lowest first. The answer is a number from 0 to 1 along it.

Terminal window
urgency=$(thinkthen score 'How urgent is the request?' \
--text 'Please refund my order.' \
--level routine --level urgent)
if awk -v urgency="$urgency" 'BEGIN { exit !(urgency > 0.5) }'; then
echo "answer today"
fi
printf '%.2f\n' "$urgency"

The score is a position between your levels, not one of them, so it is a number and there is nothing to put in a case. To get exactly one level back, ask with thinkthen choose. score is never not sure.

Options
OptionWhat it does
<QUESTION>Question to ask
[FILE]...Input files; default: standard input
--name <NAME>Optional execution identity
--text <TEXT>Judge this text instead of reading input
--level <LEVEL>Scale level; repeat low to high
--describe <LABEL=TEXT>Description for a label; repeat
--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