CorrectionResult#

class scikitplot.corpus.CorrectionResult(query, verdict, rounds, hits, stop_reason, errors=())[source]#

The returned hits, the verdict, and every round.

Iterating it yields the hits, so it is read like a search response.

Parameters:
querystr

The query as given.

verdictCorrectionVerdict

What the retrieval came to.

roundstuple of CorrectionRound

Every round run, in order.

hitstuple

The accepted round’s hits; the fused ambiguous rounds’ hits for partial; none for abstained.

stop_reasonstr

"accepted", "max_rounds", "no_rewrite" (the rewrite proposed no new query), "deadline" or "rewrite_failed".

errorstuple of ErrorRecord, default=()

Every error: a round whose search failed or whose response was not complete, a grader or rewrite that failed, a fusion that could not run, the deadline.

Parameters:
error_records()[source]#

Return the errors, as a search response does.

Return type:

list[ErrorRecord]

errors: tuple[ErrorRecord, ...] = ()#
hits: tuple[Any, ...][source]#
query: str[source]#
rounds: tuple[CorrectionRound, ...][source]#
property status: RetrievalStatus#

Return the status a search response would have.

Returns:
RetrievalStatus

cancelled when every round was cancelled (no hit is then returned: a cancelled round is not graded); degraded when any error was recorded (every incomplete round response records one); otherwise success with hits and empty without.

stop_reason: str[source]#
to_dict()[source]#

Return a JSON-compatible mapping.

Return type:

dict[str, Any]

verdict: CorrectionVerdict[source]#