Update app.py
Browse files
app.py
CHANGED
@@ -23,9 +23,10 @@ if st.button('Update NEologd', help='It may take some time'):
|
|
23 |
text = st.text_area("input", "麩菓子は、麩を主材料とした日本の菓子。")
|
24 |
|
25 |
def make_row(word, kana_index=7, lemma_index=6):
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
29 |
|
30 |
"""
|
31 |
#### [mecab-ipadic-NEologd : Neologism dictionary for MeCab](https://github.com/neologd/mecab-ipadic-neologd)
|
|
|
23 |
text = st.text_area("input", "麩菓子は、麩を主材料とした日本の菓子。")
|
24 |
|
25 |
def make_row(word, kana_index=7, lemma_index=6):
|
26 |
+
# https://stackoverflow.com/a/49774255/5602117
|
27 |
+
ff = dict(enumerate(word.feature.split(",")))
|
28 |
+
return dict(surface=word.surface, kana=ff.get(kana_index), lemma=ff.get(lemma_index),
|
29 |
+
pos1=ff.get(0), pos2=ff.get(1), pos3=ff.get(2), pos4=ff.get(3))
|
30 |
|
31 |
"""
|
32 |
#### [mecab-ipadic-NEologd : Neologism dictionary for MeCab](https://github.com/neologd/mecab-ipadic-neologd)
|