# Path: cjktools/kana_table.py
# class KanaTable(object):
#     def __init__(self):
#     def _build_dicts(self):
#     def get_coords(self, kana):
#     def from_coords(self, consonant, vowel):
#     def to_vowel_line(self, kana):
#     def to_consonant_line(self, kana):
#     def is_voiced(self, kana):
#     def is_semivoiced(self, kana):
#     def get_table(self):
#     def get_cached(cls):
#     def __repr__(self):
# 
# Path: cjktools/scripts.py
# class Script(Enum):
# class ScriptMapping:
#     def __init__(self, from_script, to_script):
#     def __call__(self, j_string):
# def normalize_ascii(j_string):
# def normalize_kana(j_string):
# def normalize(j_string):
# def get_script(script):
# def compare_kana(j_string_a, j_string_b):
# def contains_script(script, j_string):
# def script_type(char):
# def script_boundaries(j_string):
# def script_types(j_string):
# def unique_kanji(j_string):
# 
# Path: cjktools/maps.py
# def chain_mapping(*dictionaries):
# def invert_mapping(dictionary):
# def is_injective(dictionary):
# def invert_injective_mapping(dictionary):
# def map_dict(method, dictionary, in_place=False):
# def multi_dict(input_pairs):
# def procmap(method, item_list):
# def merge_dicts(*args):
# def partial_map(method, object_seq):
# def filtered_map(method, object_list):


from cjktools import kana_table
from cjktools import scripts
from cjktools import maps
from six import unichr as chr
from six import iteritems
from itertools import product
import re
    """
    Determine the possible variants of a single kana segment.
    """
    variants = set([kana_segment])
    for kana in to_voiced[kana_segment[0]]:
        variants.add(kana + kana_segment[1:])
    return variants


def onbin_variants(kana_segment):
    """
    Determine the sound euphony variants of a kana segment.
    """
    variants = set([kana_segment])
    if len(kana_segment) > 1:
        sokuon = _sokuon_map[scripts.script_type(kana_segment)]
        variants.add(kana_segment[:-1] + sokuon)

    return variants


def _create_voicing_map():
    """
    Constructs map from kana to their voiced alternatives.
    """
    table = kana_table.KanaTable.get_cached().get_table()
    voiced_line = table['か'] + table['さ'] + table['た']
    double_voiced_line = table['は']

    voicing_map = {}

# Path: cjktools/kana_table.py
# class KanaTable(object):
#     def __init__(self):
#     def _build_dicts(self):
#     def get_coords(self, kana):
#     def from_coords(self, consonant, vowel):
#     def to_vowel_line(self, kana):
#     def to_consonant_line(self, kana):
#     def is_voiced(self, kana):
#     def is_semivoiced(self, kana):
#     def get_table(self):
#     def get_cached(cls):
#     def __repr__(self):
# 
# Path: cjktools/scripts.py
# class Script(Enum):
# class ScriptMapping:
#     def __init__(self, from_script, to_script):
#     def __call__(self, j_string):
# def normalize_ascii(j_string):
# def normalize_kana(j_string):
# def normalize(j_string):
# def get_script(script):
# def compare_kana(j_string_a, j_string_b):
# def contains_script(script, j_string):
# def script_type(char):
# def script_boundaries(j_string):
# def script_types(j_string):
# def unique_kanji(j_string):
# 
# Path: cjktools/maps.py
# def chain_mapping(*dictionaries):
# def invert_mapping(dictionary):
# def is_injective(dictionary):
# def invert_injective_mapping(dictionary):
# def map_dict(method, dictionary, in_place=False):
# def multi_dict(input_pairs):
# def procmap(method, item_list):
# def merge_dicts(*args):
# def partial_map(method, object_seq):
# def filtered_map(method, object_list):


# Path: cjktools/alternations.py
from cjktools import kana_table
from cjktools import scripts
from cjktools import maps
from six import unichr as chr
from six import iteritems
from itertools import product
import re

    """
    Determine the possible variants of a single kana segment.
    """
    variants = set([kana_segment])
    for kana in to_voiced[kana_segment[0]]:
        variants.add(kana + kana_segment[1:])
    return variants


def onbin_variants(kana_segment):
    """
    Determine the sound euphony variants of a kana segment.
    """
    variants = set([kana_segment])
    if len(kana_segment) > 1:
        sokuon = _sokuon_map[scripts.script_type(kana_segment)]
        variants.add(kana_segment[:-1] + sokuon)

    return variants


def _create_voicing_map():
    """
    Constructs map from kana to their voiced alternatives.
    """
    table = kana_table.KanaTable.get_cached().get_table()
    voiced_line = table['か'] + table['さ'] + table['た']
    double_voiced_line = table['は']

    voicing_map = {}

    for kana in scripts.get_script(scripts.Script.Hiragana):