Example #1
0
        /// <summary>
        /// MeCabTaggerのインスタンスを生成する
        /// </summary>
        /// <returns>MeCabTaggerのインスタンス</returns>
        public static MeCabTagger Create()
        {
            MeCabParam param = new MeCabParam();

            param.LoadDicRC();
            return(MeCabTagger.Create(param));
        }
Example #2
0
        /// <summary>
        /// MeCabTaggerのインスタンスを生成する
        /// </summary>
        /// <param name="param">初期化パラメーター</param>
        /// <returns>MeCabTaggerのインスタンス</returns>
        public static MeCabTagger Create(MeCabParam param)
        {
            MeCabTagger tagger = new MeCabTagger();

            tagger.Open(param);
            return(tagger);
        }
 public MorphologicalAnalyzer(string dictionaryPath)
 {
     _tagger = MeCabTagger.Create(new MeCabParam
     {
         DicDir           = dictionaryPath,
         UserDic          = new string[0],
         OutputFormatType = "lattice",
         LatticeLevel     = MeCabLatticeLevel.One,
         AllMorphs        = false
     });
 }