def __init__(self, id_):
if hasattr(self, '<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>assert id_<EOL>system = pkg_path('<STR_LIT>', id_)<EOL>if not (system.exists() and system.is_dir()):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(id_))<EOL><DEDENT>self.system = TableGroup.from_file(<EOL>pkg_path('<STR_LIT>', '<STR_LIT>'))<EOL>self.system._fname = system / '<STR_LIT>'<EOL>self.features = {'<STR_LIT>': {}, '<STR_LIT>': {}, '<STR_LIT>': {}}<EOL>self._feature_values = {}<EOL>features = jsonlib.load(pkg_path('<STR_LIT>', '<STR_LIT>'))<EOL>self.diacritics = dict(<EOL>consonant={}, vowel={}, click={}, diphthong={}, tone={}, cluster={})<EOL>for dia in itertable(self.system.tabledict['<STR_LIT>']):<EOL><INDENT>if not dia['<STR_LIT>'] and not dia['<STR_LIT>']:<EOL><INDENT>self.features[dia['<STR_LIT:type>']][dia['<STR_LIT:value>']] = dia['<STR_LIT>']<EOL><DEDENT>self._feature_values[dia['<STR_LIT:value>']] = dia['<STR_LIT>']<EOL>self.diacritics[dia['<STR_LIT:type>']][dia['<STR_LIT>']] = dia['<STR_LIT:value>']<EOL><DEDENT>self.sound_classes = {}<EOL>self.columns = {}  <EOL>self.sounds = {}  <EOL>self._covered = {}<EOL>aliases = []<EOL>for cls in [Consonant, Vowel, Tone, Marker]:  <EOL><INDENT>type_ = cls.__name__.lower()<EOL>self.sound_classes[type_] = cls<EOL>self.columns[type_] = [<EOL>c['<STR_LIT:name>'].lower() for c in<EOL>self.system.tabledict['<STR_LIT>'.format(type_)]<EOL>.asdict()['<STR_LIT>']['<STR_LIT>']]<EOL>for l, item in enumerate(itertable(<EOL>self.system.tabledict['<STR_LIT>'.format(type_)])):<EOL><INDENT>if item['<STR_LIT>'] in self.sounds:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>type_ + '<STR_LIT>', l + <NUM_LIT:2>, item['<STR_LIT>']))<EOL><DEDENT>sound = cls(ts=self, **item)<EOL>for key, value in item.items():<EOL><INDENT>if key not in {'<STR_LIT>', '<STR_LIT>', '<STR_LIT>'} andvalue and value not in self._feature_values:<EOL><INDENT>self._feature_values[value] = key<EOL>if type_ != '<STR_LIT>' and value not in features[type_][key]:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(<EOL>key, value, l + <NUM_LIT:2>))<EOL><DEDENT><DEDENT><DEDENT>self.sounds[item['<STR_LIT>']] = sound<EOL>if not sound.alias:<EOL><INDENT>if sound.featureset in self.features:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>type_ + '<STR_LIT>', l + <NUM_LIT:2>, sound.name))<EOL><DEDENT>self.features[sound.featureset] = sound<EOL><DEDENT>else:<EOL><INDENT>aliases += [(l, sound.type, sound.featureset)]<EOL><DEDENT><DEDENT><DEDENT>if [x for x in aliases if x[<NUM_LIT:2>] not in self.features]:  <EOL><INDENT>error = '<STR_LIT:U+002CU+0020>'.join(<EOL>text_type(x[<NUM_LIT:0>] + <NUM_LIT:2>) + '<STR_LIT:/>' + text_type(x[<NUM_LIT:1>])<EOL>for x in aliases if x[<NUM_LIT:2>] not in self.features)<EOL>raise ValueError(<EOL>'<STR_LIT>'.format(error))<EOL><DEDENT>self._regex = None<EOL>self._update_regex()<EOL>self._normalize = {<EOL>norm(r['<STR_LIT:source>']): norm(r['<STR_LIT:target>'])<EOL>for r in itertable(self.system.tabledict['<STR_LIT>'])}<EOL>
:param system: The name of a transcription system or a directory containing one.