Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,9 @@ if st.button('Update NEologd', help='It may take some time'):
|
|
22 |
|
23 |
text = st.text_area("input", "麩菓子は、麩を主材料とした日本の菓子。")
|
24 |
|
25 |
-
def make_row(word):
|
26 |
ff = word.feature.split(",")
|
27 |
-
return dict(surface=word.surface, kana=ff[
|
28 |
pos1=ff[0], pos2=ff[1], pos3=ff[2], pos4=ff[3])
|
29 |
|
30 |
"""
|
@@ -56,7 +56,7 @@ while node:
|
|
56 |
if node.feature.startswith('BOS/EOS'):
|
57 |
pass
|
58 |
else:
|
59 |
-
data.append(make_row(node))
|
60 |
node = node.next
|
61 |
|
62 |
st.table(data)
|
|
|
22 |
|
23 |
text = st.text_area("input", "麩菓子は、麩を主材料とした日本の菓子。")
|
24 |
|
25 |
+
def make_row(word, kana_index=7, lemma_index=6):
|
26 |
ff = word.feature.split(",")
|
27 |
+
return dict(surface=word.surface, kana=ff[kana_index], lemma=ff[lemma_index],
|
28 |
pos1=ff[0], pos2=ff[1], pos3=ff[2], pos4=ff[3])
|
29 |
|
30 |
"""
|
|
|
56 |
if node.feature.startswith('BOS/EOS'):
|
57 |
pass
|
58 |
else:
|
59 |
+
data.append(make_row(node, kana_index=9, lemma_index=7))
|
60 |
node = node.next
|
61 |
|
62 |
st.table(data)
|