Commit ·
2c49b4b
1
Parent(s): ccd0619
truncate de translations to 10 and order by length ascendingly
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ def process_text(text):
|
|
| 56 |
"Lemma": "<br>".join([f"<b>{lemma}</b>" for lemma in t["lemmas"].keys()]),
|
| 57 |
"German translations": "<br>".join([
|
| 58 |
f"<span style='font-style: italic; font-weight: bold; color: #0028A5;'>{translation.split(':')[1].strip()}</span>"
|
| 59 |
-
for translation in t["translations"][:
|
| 60 |
]),
|
| 61 |
"Morphological Analysis": "<br>".join([
|
| 62 |
f"{'<br>'.join(list(set(map(str, analyses))))}<br>"
|
|
|
|
| 56 |
"Lemma": "<br>".join([f"<b>{lemma}</b>" for lemma in t["lemmas"].keys()]),
|
| 57 |
"German translations": "<br>".join([
|
| 58 |
f"<span style='font-style: italic; font-weight: bold; color: #0028A5;'>{translation.split(':')[1].strip()}</span>"
|
| 59 |
+
for translation in sorted(t["translations"], key=len)[:10]
|
| 60 |
]),
|
| 61 |
"Morphological Analysis": "<br>".join([
|
| 62 |
f"{'<br>'.join(list(set(map(str, analyses))))}<br>"
|