예제 #1
0
 public static string MeCabParseString(string input)
 {
     try
     {
         string result = MeCabParse(input);
         return(HelperBase.Repalce(result, "[\\t].*[\\n]?(EOS)?", " "));
         //return null;
     }
     catch (Exception ex)
     {
         return(ex.ToString());
     }
 }
예제 #2
0
        public static string ICTCLAParse(string input)
        {
            if (!ICTCLAS_Init("", 0))
            {
                HttpHelper http = HttpHelper.getInstance();
                http.Encoding = Encoding.UTF8;
                return(http.GetRequest(string.Format("http://ilab.kansea.com/wwwbak/split/test.php?d=string&q={0}", input)));
            }
            else
            {
                //ICTCLAS_FileProcess("Input.txt", "Input_result.txt", 1);
                StringBuilder sResult = new StringBuilder(10000);
                ICTCLAS_ParagraphProcessE(input, sResult, 1);

                ICTCLAS_Exit();
                string result = sResult.ToString();
                return(HelperBase.Repalce(result, "\\/[\\S]*\\s", " "));
            }
        }