def __init__(self, clusters_path: str, *, use_full_paths: bool=False, use_prefixes: bool=False, prefixes: Optional[Sequence[int]]=None):
    if ((not use_full_paths) and (not use_prefixes)):
        raise ValueError
    self.prefix_dict = {}
    self.full_path_dict = {}
    self.use_full_paths = use_full_paths
    with open(clusters_path, 'r', encoding='utf-8') as cluster_file:
        for line in cluster_file:
            (cluster, word, _frequency) = line.split('\t')
            if use_full_paths:
                self.full_path_dict[word] = cluster
            elif use_prefixes:
                if (prefixes is not None):
                    self.prefix_dict[word] = [cluster[:prefix] for prefix in prefixes if (prefix <= len(cluster))]
                else:
                    self.prefix_dict[word] = [cluster[:prefix] for prefix in range(1, (len(cluster) + 1))]
def __init__(self, clusters_path: str, *, use_full_paths: bool=False, use_prefixes: bool=False, prefixes: Optional[Sequence[int]]=None):
    if ((not use_full_paths) and (not use_prefixes)):
        raise ValueError
    self.prefix_dict = {}
    self.full_path_dict = {}
    self.use_full_paths = use_full_paths
    with open(clusters_path, 'r', encoding='utf-8') as cluster_file:
        for line in cluster_file:
            (cluster, word, _frequency) = line.split('\t')
            if use_full_paths:
                self.full_path_dict[word] = cluster
            elif use_prefixes:
                if (prefixes is not None):
                    self.prefix_dict[word] = [cluster[:prefix] for prefix in prefixes if (prefix <= len(cluster))]
                else:
                    self.prefix_dict[word] = [cluster[:prefix] for prefix in range(1, (len(cluster) + 1))]