ScoreΒΆ

Scoring algorithm to return probability of correct decryption. Output range depends on the score functions used.

lantern.score(text, *score_functions)

Score text using score_functions.

Examples

>>> score("abc", function_a)
>>> score("abc", function_a, function_b)
Parameters:
  • text (str) – The text to score
  • *score_functions (variable length argument list) – functions to score with
Returns:

Arithmetic mean of scores

Raises:

ValueError – If score_functions is empty