def METHOD_NAME(self, img_dir: str, ann_path: str) -> List:
    """Parse annotations."""
    assert isinstance(ann_path, str)
    samples = list()
    for anno in self.loader(
            file_path=ann_path,
            format=self.format,
            encoding=self.encoding,
            separator=self.sep):
        text = anno['text'].strip()
        if self.remove_strs is not None:
            for strs in self.remove_strs:
                text = text.replace(strs, '')
        if text == self.ignore:
            continue
        img_name = anno['img']
        samples.append((osp.join(img_dir, img_name), text))
    return samples