Esempio n. 1
0
        public void Init_Seg_Sub()
        {
            pSeg = new C_Segmentation();

            pSeg.pTreapWord = new C_Treap_Funny <Treap <C_Word_Seg> >();


            //网络的词汇
            ArrayList pList = S_Dir.ListFile(Seg_Path + "\\");

            for (int i = 0; i < pList.Count; i++)
            {
                string strFile = Seg_Path + "\\" + pList[i];
                if (strFile.EndsWith(".txt"))
                {
                    StreamReader pReader = S_File_Text.Read_Begin(strFile);

                    string strLine = "";
                    while (pReader.Peek() != -1)
                    {
                        strLine = S_File_Text.Read_Line(pReader);
                        pSeg.readLine_fromDic(strLine);
                    }
                }
            }

            pFrmApp.Call_Event(this.callback_init, "");
        }
Esempio n. 2
0
        public string File_List_Dir(string strDir)
        {
            string    strReturn  = "";
            ArrayList pArrayList = S_Dir.ListDir(strDir);

            for (int i = 0; i < pArrayList.Count; i++)
            {
                strReturn += pArrayList[i] + "|";
            }
            if (strReturn.EndsWith("|"))
            {
                strReturn = strReturn.Substring(0, strReturn.Length - 1);
            }
            return(strReturn);
        }