Spaces:
Runtime error
Runtime error
permutations, not combinations. order of letters matters
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import langcodes
|
|
3 |
from allosaurus.app import read_recognizer
|
4 |
from pathlib import Path
|
5 |
import string
|
6 |
-
from itertools import
|
7 |
from collections import defaultdict
|
8 |
|
9 |
@st.cache
|
@@ -11,7 +11,7 @@ def get_supported_codes():
|
|
11 |
model = read_recognizer()
|
12 |
supported_codes = []
|
13 |
supported_codes.append("ipa") # default option
|
14 |
-
for combo in
|
15 |
code = "".join(combo)
|
16 |
if model.is_available(code):
|
17 |
supported_codes.append(code)
|
|
|
3 |
from allosaurus.app import read_recognizer
|
4 |
from pathlib import Path
|
5 |
import string
|
6 |
+
from itertools import permutations
|
7 |
from collections import defaultdict
|
8 |
|
9 |
@st.cache
|
|
|
11 |
model = read_recognizer()
|
12 |
supported_codes = []
|
13 |
supported_codes.append("ipa") # default option
|
14 |
+
for combo in permutations(string.ascii_lowercase, r=3):
|
15 |
code = "".join(combo)
|
16 |
if model.is_available(code):
|
17 |
supported_codes.append(code)
|