Spaces:
Running
Running
Commit ·
4f56ef0
1
Parent(s): a2a2a91
making it simplified chinese
Browse files- src/create_results_dataset.ipynb +4 -4
- src/streamlit_app.py +1 -1
src/create_results_dataset.ipynb
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"cell_type": "code",
|
| 12 |
-
"execution_count":
|
| 13 |
"metadata": {},
|
| 14 |
"outputs": [
|
| 15 |
{
|
|
@@ -99,7 +99,7 @@
|
|
| 99 |
"\n",
|
| 100 |
"# Data from our table (see overleaf)\n",
|
| 101 |
"data = [\n",
|
| 102 |
-
" # Class, Tool, Type, English Easy, English Hard, English Implicit, Spanish Easy, Chinese Easy, BLEU score (English, Explicit avg\n",
|
| 103 |
" [\"None\", \"No anonymization\", \"Baseline\", 100, 98, 32, 100, 100, 1.0],\n",
|
| 104 |
" [\"NER-based\", \"Azure\", \"NER-based\", 22, 33, 21, 14, 14, 0.55],\n",
|
| 105 |
" [\"NER-based\", \"Presidio\", \"NER-based\", 41, 77, 30, 88, 86, 0.85],\n",
|
|
@@ -126,7 +126,7 @@
|
|
| 126 |
" \"English Explicit (hard)\",\n",
|
| 127 |
" \"English Implicit\",\n",
|
| 128 |
" \"Spanish Explicit (easy)\",\n",
|
| 129 |
-
" \"Chinese Explicit (easy)\",\n",
|
| 130 |
" \"BLEU score (English, Explicit avg)\",\n",
|
| 131 |
" ],\n",
|
| 132 |
")\n",
|
|
@@ -134,7 +134,7 @@
|
|
| 134 |
"# Compute simple averages\n",
|
| 135 |
"df[\"English Avg\"] = df[[\"English Explicit (easy)\", \"English Explicit (hard)\"]].mean(axis=1)\n",
|
| 136 |
"df[\"Spanish Avg\"] = df[[\"Spanish Explicit (easy)\"]].mean(axis=1)\n",
|
| 137 |
-
"df[\"Chinese Avg\"] = df[[\"Chinese Explicit (easy)\"]].mean(axis=1)\n",
|
| 138 |
"\n",
|
| 139 |
"# Create HF dataset\n",
|
| 140 |
"dataset = Dataset.from_pandas(df)\n",
|
|
|
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"cell_type": "code",
|
| 12 |
+
"execution_count": null,
|
| 13 |
"metadata": {},
|
| 14 |
"outputs": [
|
| 15 |
{
|
|
|
|
| 99 |
"\n",
|
| 100 |
"# Data from our table (see overleaf)\n",
|
| 101 |
"data = [\n",
|
| 102 |
+
" # Class, Tool, Type, English Easy, English Hard, English Implicit, Spanish Easy, Simplified Chinese Easy, BLEU score (English, Explicit avg\n",
|
| 103 |
" [\"None\", \"No anonymization\", \"Baseline\", 100, 98, 32, 100, 100, 1.0],\n",
|
| 104 |
" [\"NER-based\", \"Azure\", \"NER-based\", 22, 33, 21, 14, 14, 0.55],\n",
|
| 105 |
" [\"NER-based\", \"Presidio\", \"NER-based\", 41, 77, 30, 88, 86, 0.85],\n",
|
|
|
|
| 126 |
" \"English Explicit (hard)\",\n",
|
| 127 |
" \"English Implicit\",\n",
|
| 128 |
" \"Spanish Explicit (easy)\",\n",
|
| 129 |
+
" \"Simplified Chinese Explicit (easy)\",\n",
|
| 130 |
" \"BLEU score (English, Explicit avg)\",\n",
|
| 131 |
" ],\n",
|
| 132 |
")\n",
|
|
|
|
| 134 |
"# Compute simple averages\n",
|
| 135 |
"df[\"English Avg\"] = df[[\"English Explicit (easy)\", \"English Explicit (hard)\"]].mean(axis=1)\n",
|
| 136 |
"df[\"Spanish Avg\"] = df[[\"Spanish Explicit (easy)\"]].mean(axis=1)\n",
|
| 137 |
+
"df[\"Simplified Chinese Avg\"] = df[[\"Simplified Chinese Explicit (easy)\"]].mean(axis=1)\n",
|
| 138 |
"\n",
|
| 139 |
"# Create HF dataset\n",
|
| 140 |
"dataset = Dataset.from_pandas(df)\n",
|
src/streamlit_app.py
CHANGED
|
@@ -165,7 +165,7 @@ st.caption(
|
|
| 165 |
|
| 166 |
left_pad, c1, c2, right_pad = st.columns([1, 2, 2, 1], gap="medium")
|
| 167 |
with c1:
|
| 168 |
-
language = st.selectbox("Select the language", ["English", "Spanish", "Chinese"], label_visibility="visible")
|
| 169 |
|
| 170 |
with c2:
|
| 171 |
st.write("") # Vertical spacer to align with selectbox
|
|
|
|
| 165 |
|
| 166 |
left_pad, c1, c2, right_pad = st.columns([1, 2, 2, 1], gap="medium")
|
| 167 |
with c1:
|
| 168 |
+
language = st.selectbox("Select the language", ["English", "Spanish", "Simplified Chinese"], label_visibility="visible")
|
| 169 |
|
| 170 |
with c2:
|
| 171 |
st.write("") # Vertical spacer to align with selectbox
|