- content += "compound_suffixes:\n"
- content += '\n'.join((" - " + s for s in suffixes)) + '\n'
- content += "abbreviations:\n"
- content += '\n'.join((" - " + s for s in abbr)) + '\n'
+ content += "variants:\n - words:\n"
+ content += '\n'.join((" - " + s for s in variants)) + '\n'
+ for k, v in kwargs:
+ content += " {}: {}\n".format(k, v)
- fpath = cfgfile(['strasse', 'straße', 'weg'],
- ['strasse,straße => str',
- 'prospekt => pr'])
+ fpath = cfgfile('~strasse,~straße -> str',
+ '~weg => weg',
+ 'prospekt -> pr')
assert get_normalized_variants(proc, "Bauwegstr") == ['bauwegstr']
assert set(get_normalized_variants(proc, "holzweg")) \
== {'holz weg', 'holzweg'}
assert get_normalized_variants(proc, "Bauwegstr") == ['bauwegstr']
assert set(get_normalized_variants(proc, "holzweg")) \
== {'holz weg', 'holzweg'}
assert get_normalized_variants(proc, "hallo") == ['hallo']
def test_variants_empty(cfgfile):
assert get_normalized_variants(proc, "hallo") == ['hallo']
def test_variants_empty(cfgfile):
- fpath = cfgfile([], ['saint => s,st', 'street => st'])
+ fpath = cfgfile('saint -> s,st', 'street -> st')
- fpath = cfgfile(['street'], ['street => s,st', 'master => mstr'])
+ fpath = cfgfile('~street => s,st', 'master => mstr')