vizseq.* or vizseq.ipynb.*
view_stats()
Showing the dataset statistics, including examples count, tokens count, sentence length distribution, etc.
It contains Matplotlib figures and you need to add %matplotlib inline before use.
Arguments
sources: Union[str, List[str], Dict[str, List[str]]]: Source-side data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.references: Union[str, List[str], Dict[str, List[str]]]: Target-side data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.tags: Optional[Union[str, List[str], Dict[str, List[str]]]] = None: Per-example tags for example grouping. Default toNone.
available_scorers()
Showing the IDs of built-in scorers, which can be used in view_scores() and
view_examples().
view_scores()
Arguments
references: Union[str, List[str], Dict[str, List[str]]]: Target-side data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.hypothesis: Optional[Union[str, List[str], Dict[str, List[str]]]] = None: Model prediction data source. Can be a path, paths or lists of sentences. Refer to the data section for more details. Default toNone.metrics: List[str]: List of scorer IDs. Useavailable_scorers()to check all the available ones.tags: Optional[Union[str, List[str], Dict[str, List[str]]]] = None: Per-example tags for example grouping. Default toNone.
view_examples()
Showing examples with model predictions in pages with specified metrics, keyword, sorting, etc.
Arguments
sources: Union[str, List[str], Dict[str, List[str]]]: Source-side data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.references: Union[str, List[str], Dict[str, List[str]]]: Target-side data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.hypothesis: Optional[Union[str, List[str], Dict[str, List[str]]]] = None: Model prediction data source. Can be a path, paths or lists of sentences. Refer to the data section for more details. Default toNone.metrics: Optional[List[str]] = None: List of scorer IDs. Default toNone. Useavailable_scorers()to check all the available ones.query: str = '': The keyword(s) for example filtering. Default to''.page_sz: int = 10: Page size. Default to10.page_no: int = 1: Page number. Default to1.sorting: VizSeqSortingType = VizSeqSortingType.originalneed_g_translate: bool = False: To show Google Translate results or not. Default toFalse.disable_alignment: bool = False: Not to show source-reference and reference-hypothesis alignments for rendering speedup. Default toFalse.
view_n_grams()
Showing the n-grams (n=1,2,3,4) in the input data (sources, references, etc.).
Arguments
data: Union[str, List[str], Dict[str, List[str]]]: The data source. Can be a path, paths or lists of sentences. Refer to the data section for more details.k: int = 64: Number of n-grams to be shown. Default to64.