11.2. twol.cfg module¶
Global values and functions for twol modules.
These definitions and values are used by several twol-related programs, e.g. twol, multialign, table2words, words2zerofilled etc.
- twol.cfg.all_pairs_fst = None¶
An FST which accepts any one symbol pair in symbol_pair_set
- twol.cfg.all_zero_weight = 1000.0¶
in multialign: the weight for a set {‘Ø’} which is normally not preferred but sometimes is needed, eg. when using Øs in the input words
- twol.cfg.example_lst = []¶
List of example words as pair symbol strings
- twol.cfg.example_set = {}¶
Set of examples as space-separated string of normalized pair symbols
- twol.cfg.examples_fst = None¶
Examples as a tranducer that accepts them as symbol pair sequences
- twol.cfg.final = False¶
In multialign: preferring of the deletion of final phonemes
- twol.cfg.input_symbol_set = {}¶
The set of input symbols (phonemes and morphophonemes) occurring in the examples
- twol.cfg.output_symbol_set = {}¶
The set of output symbols (surface characters) occurring in the examples
- twol.cfg.pair_symbol_set = {}¶
The set of all normalized pair symbols (e.g. ‘k’, ‘{aä}:a’) occurring in the examples
- twol.cfg.pairsym2sympair(pairsym)[source]¶
Converts one pair symbol into a corresponding symbol pair
pairsym – a pair symbol, e.g. ‘k’ or ‘{aä}:a’ or ‘k:k’
returns – a symbol pair, e.g. (‘k’, ‘k’) or (‘{aä}’, ‘a’) or (‘k’,’k’)
- twol.cfg.symbol_pair_set = {}¶
The set of all symbol pairs (e.g. (‘{aä}’, ‘a’)) in the examples.
- twol.cfg.sympair2pairsym(insym, outsym)[source]¶
Converts a symbol pair into a corresponding normalized pair symbol
insym – a symbol in the input alphabet, e.g. ‘k’ or ‘{aä}’
outsym – a symbol in the output alphabet, e.g. ‘k’ or ‘a’
returns – a normalized pair symbol, e.g. ‘k’ or ‘{aä}:a’ (not ‘k:k’)