Ejemplo n.º 1
0
Archivo: 30.py Proyecto: tkyf/nlp100
def main():
    import neko

    text = neko.read_and_map()
    print(text)

    return
Ejemplo n.º 2
0
Archivo: 30.py Proyecto: tkyf/nlp100
def main():
    import neko

    text = neko.read_and_map()
    print(text)

    return
Ejemplo n.º 3
0
Archivo: 32.py Proyecto: tkyf/nlp100
def main():
    import neko

    text = neko.read_and_map()
    result = neko.pick(text, 'pos', '動詞', 'base')

    print(list(result))
    return
Ejemplo n.º 4
0
Archivo: 32.py Proyecto: tkyf/nlp100
def main():
    import neko

    text = neko.read_and_map()
    result = neko.pick(text, 'pos', '動詞', 'base')

    print(list(result))
    return
Ejemplo n.º 5
0
Archivo: 33.py Proyecto: tkyf/nlp100
def main():
    import neko

    text = neko.read_and_map()
    result = neko.pick(text, 'pos1', 'サ変接続')
    print(list(result))

    return
Ejemplo n.º 6
0
Archivo: 39.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    frequency_list = neko.frequency_list(text)
    frequencies = [freq for word, freq in frequency_list]
    x = [i for i in range(len(frequencies))]

    plt.plot(x, frequencies)
    plt.xscale('log')
    plt.yscale('log')
    plt.show()

    return
Ejemplo n.º 7
0
def main():
    text = neko.read_and_map()
    frequency_list = neko.frequency_list(text)
    frequencies = [freq for word, freq in frequency_list]
    x = [i for i in range(len(frequencies))]

    plt.plot(x, frequencies)
    plt.xscale('log')
    plt.yscale('log')
    plt.show()

    return
Ejemplo n.º 8
0
Archivo: 38.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    frequency_list = neko.frequency_list(text)
    hist = sorted(neko.histogram(frequency_list).items())
    # 全部出すと見えないので上位10件
    hist = hist[:10]

    x = [x for x, y in hist]
    y = [y for x, y in hist]
    plt.bar(x, y)
    plt.show()

    return
Ejemplo n.º 9
0
Archivo: 38.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    frequency_list = neko.frequency_list(text)
    hist = sorted(neko.histogram(frequency_list).items())
    # 全部出すと見えないので上位10件
    hist = hist[:10]

    x = [x for x, y in hist]
    y = [y for x, y in hist]
    plt.bar(x, y)
    plt.show()

    return
Ejemplo n.º 10
0
Archivo: 37.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.frequency_list(text)
    top10 = result[:10]
    top10_freqs = [x[1] for x in top10]
    top10_surfaces = [x[0][0] for x in top10]
    print(top10_freqs)

    x = range(10)
    y = top10_freqs
    plt.bar(x, y, align="center")
    plt.xticks(x, top10_surfaces, fontproperties=fp)
    plt.show()

    return
Ejemplo n.º 11
0
Archivo: 34.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.a_no_b(text)
    print(list(result))

    return
Ejemplo n.º 12
0
Archivo: 36.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.frequency_list(text)
    print(result)

    return
Ejemplo n.º 13
0
Archivo: 34.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.a_no_b(text)
    print(list(result))

    return
Ejemplo n.º 14
0
Archivo: 35.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.noun_junction(text)
    print(list(result))

    return
Ejemplo n.º 15
0
Archivo: 36.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.frequency_list(text)
    print(result)

    return
Ejemplo n.º 16
0
Archivo: 35.py Proyecto: tkyf/nlp100
def main():
    text = neko.read_and_map()
    result = neko.noun_junction(text)
    print(list(result))

    return