diff --git a/apertium_apy/mode_search.py b/apertium_apy/mode_search.py index 95722f4..758affe 100644 --- a/apertium_apy/mode_search.py +++ b/apertium_apy/mode_search.py @@ -29,7 +29,7 @@ def is_loop(dirpath, rootpath, real_root=None): def search_path(rootpath, include_pairs=True, verbosity=1): - lang_code = r'[a-z]{2,3}(?:_[A-Za-z]+)?' + lang_code = r'[a-z]{2,3}(?:_[A-Za-z0-9_]+)?' type_re = { 'pair': re.compile(r'({0})-({0})\.mode'.format(lang_code)), 'analyzer': re.compile(r'(({0}(-{0})?)-(an)?mor(ph)?)\.mode'.format(lang_code)),