using UnityEngine;
using System.Collections;
using System;
using NMeCab;

public class MeCabTest : MonoBehaviour
{
    MeCabTagger tagger;
    string sentence = "ここに解析したい日本語の文章を入力してください。";
    string result = "";

    void Start()
    {
        tagger = MeCabTagger.Create();
    }

    void OnGUI()
    {
        sentence = GUILayout.TextField(sentence);
        if (GUILayout.Button("解析"))
        {
            result = tagger.Parse(sentence);
        }
        GUILayout.Label(result);
    }
}
