예제 #1
0
        public List <weightTableCompiled> GetTFIDF_DLC_AllCached(builderForLog loger = null)
        {
            List <weightTableCompiled> allDLC_TFIDFs = new List <weightTableCompiled>();

            List <string> DLC_TFIDF_Files = TFIDF_ConstructFolder.findFiles("dlc_*.xml");

            if (loger != null)
            {
                loger.log("[" + DLC_TFIDF_Files.Count + "] DLC TFIDF files detected in the cache folder [" + TFIDF_ConstructFolder.path + "]");
            }



            int    tc = DLC_TFIDF_Files.Count;
            double tr = 0;
            int    c  = 0;


            foreach (string fPath in DLC_TFIDF_Files)
            {
                c++;
                weightTableCompiled dlc = new weightTableCompiled(fPath, true, c.ToString("D5"));

                allDLC_TFIDFs.Add(dlc);

                tr = c.GetRatio(tc);
                if (loger != null)
                {
                    aceLog.consoleControl.writeToConsole(tr.ToString("P2") + " ", loger, false, 0);
                }
            }
            return(allDLC_TFIDFs);
        }
예제 #2
0
 public FileInfo GetTFIDF_Master_File(getWritableFileMode mode = getWritableFileMode.newOrExisting)
 {
     return(TFIDF_ConstructFolder.pathFor("master_tf-idf.xml").getWritableFile(mode));
 }
예제 #3
0
 public FileInfo GetTFIDF_DLC_File(indexDomain idomain, getWritableFileMode mode = getWritableFileMode.newOrExisting)
 {
     return(TFIDF_ConstructFolder.pathFor("dlc_" + idomain.HashCode + ".xml").getWritableFile(mode));
 }
예제 #4
0
        public weightTableCompiled GetTFIDF_DLC(indexDomain idomain, getWritableFileMode mode = getWritableFileMode.newOrExisting)
        {
            FileInfo fi = new FileInfo(TFIDF_ConstructFolder.pathFor("dlc_" + idomain.HashCode + ".xml"));  //.getWritableFile(mode);

            return(new weightTableCompiled(fi.FullName, true, idomain.domain));
        }
예제 #5
0
 public FileInfo GetWordList_File(indexDomain idomain)
 {
     return(TFIDF_ConstructFolder.pathFor("d_words_" + idomain.HashCode + ".txt").getWritableFile(getWritableFileMode.newOrExisting));
 }