kargaranamir
commited on
Commit
β’
fccef12
1
Parent(s):
a89c8a9
add ace, min, mui and filter green ones.
Browse files- app.py +6 -3
- languages/ace_Latn.json +32 -0
- languages/min_Latn.json +21 -0
- languages/mui_Latn.json +21 -0
app.py
CHANGED
@@ -21,13 +21,16 @@ def render_home_table():
|
|
21 |
df_data['ISO Code'] = df_data['ISO Code'].astype(str) # Convert to string
|
22 |
df_data['Number of Sites'] = df_data.apply(lambda row: '<a href="/?isocode={}&site=True" target="_self">{}</a>'.format(row['ISO Code'], row['Number of Sites']), axis=1)
|
23 |
df_data['Number of Links'] = df_data.apply(lambda row: '<a href="/?isocode={}&links=True" target="_self">{}</a>'.format(row['ISO Code'], row['Number of Links']), axis=1)
|
24 |
-
df_data["
|
25 |
-
df_data['Color_Order'] = pd.Categorical(df_data['
|
26 |
# Sort by Color_Order then ISO Code
|
27 |
df_data = df_data.sort_values(by=['Color_Order', 'ISO Code'])
|
28 |
|
|
|
|
|
|
|
29 |
# Display the table
|
30 |
-
df_data = df_data[['ISO Code', 'Language Name', 'Family', 'Subgrouping', 'Number of Sites', 'Number of Links', 'Number of Speakers', '
|
31 |
st.write(df_to_html(df_data), unsafe_allow_html=True)
|
32 |
|
33 |
@st.cache_data
|
|
|
21 |
df_data['ISO Code'] = df_data['ISO Code'].astype(str) # Convert to string
|
22 |
df_data['Number of Sites'] = df_data.apply(lambda row: '<a href="/?isocode={}&site=True" target="_self">{}</a>'.format(row['ISO Code'], row['Number of Sites']), axis=1)
|
23 |
df_data['Number of Links'] = df_data.apply(lambda row: '<a href="/?isocode={}&links=True" target="_self">{}</a>'.format(row['ISO Code'], row['Number of Links']), axis=1)
|
24 |
+
df_data["Support by MADLAD400, FLORES200, GLOT500"] = df_data.apply(lambda row: color_mapping([row["Supported by allenai/MADLAD-400"] + row["Supported by facebook/flores"] + row["Supported by cis-lmu/Glot500"]]), axis =1)
|
25 |
+
df_data['Color_Order'] = pd.Categorical(df_data['Support by MADLAD400, FLORES200, GLOT500'], categories=['π₯', 'π§', 'π¨', 'π©'], ordered=True)
|
26 |
# Sort by Color_Order then ISO Code
|
27 |
df_data = df_data.sort_values(by=['Color_Order', 'ISO Code'])
|
28 |
|
29 |
+
# Filter π©
|
30 |
+
df_data = df_data[df_data["Support by MADLAD400, FLORES200, GLOT500"]!= 'π©']
|
31 |
+
|
32 |
# Display the table
|
33 |
+
df_data = df_data[['ISO Code', 'Language Name', 'Family', 'Subgrouping', 'Number of Sites', 'Number of Links', 'Number of Speakers', 'Support by MADLAD400, FLORES200, GLOT500']]
|
34 |
st.write(df_to_html(df_data), unsafe_allow_html=True)
|
35 |
|
36 |
@st.cache_data
|
languages/ace_Latn.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"Language Name": "Achinese",
|
3 |
+
"Family": "Austronesian",
|
4 |
+
"Subgrouping": "Malayo-Chamic",
|
5 |
+
"Number of Speakers": "2_800_000",
|
6 |
+
"Supported by allenai/MADLAD-400": 1,
|
7 |
+
"Supported by facebook/flores": 1,
|
8 |
+
"Supported by cis-lmu/Glot500": 1,
|
9 |
+
"Sites": [
|
10 |
+
{
|
11 |
+
"Site Name": "ace.wikipedia.org",
|
12 |
+
"Site URL": "https://ace.wikipedia.org/wiki/",
|
13 |
+
"Category": "articles",
|
14 |
+
"Confidence": "π©",
|
15 |
+
"Info": "confirmed by webpage metadata",
|
16 |
+
"Possible Parallel Languages": "many",
|
17 |
+
"Links": []
|
18 |
+
},
|
19 |
+
{
|
20 |
+
"Site Name": "misc",
|
21 |
+
"Site URL": "misc",
|
22 |
+
"Category": "misc",
|
23 |
+
"Confidence": "π©",
|
24 |
+
"Info": "confirmed by glotlid and webpage metadata",
|
25 |
+
"Possible Parallel Languages": "",
|
26 |
+
"Links": ["https://www.cdc.gov/disasters/tsunamis/translations/hepeacehanese.pdf",
|
27 |
+
"https://www.cdc.gov/disasters/tsunamis/translations/choleraacehanese.pdf",
|
28 |
+
"https://klinikdigital.org/wp-content/uploads/2022/01/MODUL-PRIVASI-DAN-KEAMANAN-DIGITAL-EDISI-ACEH.pdf"]
|
29 |
+
}
|
30 |
+
]
|
31 |
+
}
|
32 |
+
|
languages/min_Latn.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"Language Name": "Minangkabau",
|
3 |
+
"Family": "Austronesian",
|
4 |
+
"Subgrouping": "Malayo-Chamic",
|
5 |
+
"Number of Speakers": "5_500_000",
|
6 |
+
"Supported by allenai/MADLAD-400": 1,
|
7 |
+
"Supported by facebook/flores": 1,
|
8 |
+
"Supported by cis-lmu/Glot500": 1,
|
9 |
+
"Sites": [
|
10 |
+
{
|
11 |
+
"Site Name": "misc",
|
12 |
+
"Site URL": "misc",
|
13 |
+
"Category": "misc",
|
14 |
+
"Confidence": "π©",
|
15 |
+
"Info": "confirmed by glotlid and webpage metadata",
|
16 |
+
"Possible Parallel Languages": "",
|
17 |
+
"Links": ["https://klinikdigital.org/wp-content/uploads/2022/01/MODUL-PRIVASI-DAN-KEAMANAN-DIGITAL-EDISI-PALEMBANG.pdf"]
|
18 |
+
}
|
19 |
+
]
|
20 |
+
}
|
21 |
+
|
languages/mui_Latn.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"Language Name": "Musi",
|
3 |
+
"Family": "Austronesian",
|
4 |
+
"Subgrouping": "Malayo-Chamic",
|
5 |
+
"Number of Speakers": "600_000",
|
6 |
+
"Supported by allenai/MADLAD-400": 0,
|
7 |
+
"Supported by facebook/flores": 0,
|
8 |
+
"Supported by cis-lmu/Glot500": 0,
|
9 |
+
"Sites": [
|
10 |
+
{
|
11 |
+
"Site Name": "misc",
|
12 |
+
"Site URL": "misc",
|
13 |
+
"Category": "misc",
|
14 |
+
"Confidence": "π©",
|
15 |
+
"Info": "confirmed by glotlid and webpage metadata",
|
16 |
+
"Possible Parallel Languages": "",
|
17 |
+
"Links": ["https://klinikdigital.org/wp-content/uploads/2022/01/MODUL-PRIVASI-DAN-KEAMANAN-DIGITAL-EDISI-PALEMBANG.pdf"]
|
18 |
+
}
|
19 |
+
]
|
20 |
+
}
|
21 |
+
|