* How certain one row is, worded, whether or not anyone put a number on it. * * The 0.9.0 engine scores nothing: it reads its call, caller and raise * relations straight off the graph, so a recorded confidence is absent because * there was never anything to score rather than because a field went
(confidence: number | undefined, state: KnowledgeState)
| 648 | * a derived claim nobody scored, so both say which one they are. |
| 649 | */ |
| 650 | function certaintyOf(confidence: number | undefined, state: KnowledgeState): { label: string; note: string } { |
| 651 | if (confidence !== undefined) { |
| 652 | return { label: confidenceLabel(confidence), note: CONFIDENCE_SCORED_TOOLTIP }; |
| 653 | } |
| 654 | return state === 'known' |
| 655 | ? { label: CONFIDENCE_EXACT, note: CONFIDENCE_EXACT_TOOLTIP } |
| 656 | : { label: CONFIDENCE_UNSCORED, note: CONFIDENCE_UNSCORED_TOOLTIP }; |
| 657 | } |
| 658 | |
| 659 | /** |
| 660 | * One row, with what a reviewer needs appended to it. |
no test coverage detected