ThinkThen

Yes or no per pair, or pick one

relate: find relationships among named entities.

Paul McCartney sings Yesterday, and Ringo Starr sings Octopus's Garden. The two wrong pairs do not reach the default threshold.
sings="sings=singer:song"

cat <<'EOF' |
[
  {"name": "Paul McCartney", "kind": "singer"},
  {"name": "Ringo Starr", "kind": "singer"},
  {"name": "Yesterday", "kind": "song"},
  {"name": "Octopus's Garden", "kind": "song"}
]
EOF
thinkthen relate "$sings" |
jq -c '[.source.name, .target.name, .probability]'
Output
["Paul McCartney","Yesterday",0.81]
["Ringo Starr","Octopus's Garden",0.88]
exit 0

You give it a set of names, the kind of each name, and the relations you care about. relate reads no other text. Jev answers from what it knows about the names. You get back one edge for each related pair, with its probability. A rule asks one yes or no question for each pair. In a rules file, a rule marked "single": true asks one choice for each source instead, and gives that source at most one edge. For the links a text states, use recognize --relation.

Read the answer

A relation has a direction, or it reads the same both ways. The number on an edge is a probability. Your threshold decides which edges you keep.

Exit codeWhat it means
0the run finished
6the run finished with failed questions
2usage or input error
4the backend failed or refused, as it does for evidence over the size limit
5a local failure
70a defect in the tool

Call it from your language

The Bash example opens this page.

Watch relate answer questions about Beatles songs: relate asks what Jev knows about the names.