module decoding_table_row
class DecodingTableRow
Simple dataclass to hold a single row of a table of decoding attempts.
method __init__
__init__(
encoding_label: Text,
confidence_text: Text,
was_forced_txt: Text,
decoded_txt: Text,
confidence: float,
encoding: str,
sort_score: float
) → None
property encoding_label_plain
classmethod from_decoded_assessment
from_decoded_assessment(
assessment: EncodingAssessment,
was_forced_txt: Text,
decoded_txt: Text,
score: float
) → DecodingTableRow
Alternate constructor that builds a table row for a decoding attempt.
Args:
assessment(EncodingAssessment): Thechardetassessment for the encoding used.was_forced_txt(Text): Text indicating if the decode was forced.decoded_txt(Text): The decoded string as richTextwith color highlighting.score(float): The score to use for sorting this row in the table.
classmethod from_undecoded_assessment
from_undecoded_assessment(
assessment: EncodingAssessment,
score: float
) → DecodingTableRow
Alternate constructor for a row with just chardet assessment confidence data and no actual decoding attempt string.
Args:
assessment(EncodingAssessment): Thechardetassessment for the encoding used.score(float): The score to use for sorting this row within the table.
method to_row_list
to_row_list() → list[Text]
Returns a row for the decoding attempts table.
This file was automatically generated via lazydocs.