minicons.utils module

minicons.utils.get_batch(data: list, batch_size: int, shuffle: bool = False)
minicons.utils.character_span(sentence, word)
minicons.utils.find_pattern(pieces: List, whole: List) Tuple[int, int]
minicons.utils.edit_distance(word1: str, word2: str) int
minicons.utils.argmin(lst: List) int
minicons.utils.argmax(lst: List) int
minicons.utils.find_index(context: str, word: str, method: Optional[str] = 'regular') Tuple[int, int]
minicons.utils.gen_words(length: int) str
minicons.utils.find_paired_indices(context: str, word1: str, word2: str, importance: int = 1) Tuple[Tuple[int, int], Tuple[int, int]]
minicons.utils.mask(sentence: str, word: str) str