langml.baselines.matching.sbert.dataloder
Module Contents
Classes
- class langml.baselines.matching.sbert.dataloder.DataLoader(data: List, tokenizer: object, batch_size: int = 32)[source]
Bases:
langml.baselines.BaseDataLoader- static load_data(fpath: str, build_vocab: bool = False, label2idx: Optional[Dict] = None) Union[List[Tuple[str, str, int]], Tuple[List[Tuple[str, str, int]], Dict]][source]
- Parameters
fpath – str, path of data
build_vocab – bool, whether to build vocabulary
label2idx – Optional[Dict], label to index dict