Answer

com.softinio.verdict4s.algebra.Answer
See theAnswer companion object
enum Answer

One answer, exactly as it comes off the wire.

Untyped in the sense that a Choice answer carries the option as a String: this is the honest shape of the response, and it is what Evaluation.answers exposes. The typed views below — NoulAnswer, ChoiceAnswer, ScoreAnswer — are what the question builders project this into once the question's own type is known.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Choice(choice: OptionName, probabilities: SortedMap[OptionName, Probability], confidence: Confidence)

The chosen option, the full distribution, and how certain the model is.

The chosen option, the full distribution, and how certain the model is.

Attributes

final case class Noul(noul: Probability)

The probability that the answer is yes. Carries no confidence: the service does not report one for Noul.

The probability that the answer is yes. Carries no confidence: the service does not report one for Noul.

Attributes

final case class Score(score: Double, legend: SortedMap[Int, String], probabilities: SortedMap[Int, Probability], confidence: Confidence)

A probability-weighted value across the levels; it can land between them.

A probability-weighted value across the levels; it can land between them.

legend and probabilities are keyed by level index. The service sends those keys as strings ("0", "1", …); decoding them to Int is faithful to their documented meaning, and means legend.head is level 0 rather than level 10.

Attributes