Beispiel #1
0
        static void Main(string[] args)
        {
            ClassLabelDictionary classLabelDict = new ClassLabelDictionary();
            classLabelDict.LoadFromDB();

            WordDictionary wordDict = new WordDictionary();
            wordDict.LoadFromDB();

            TFIDFDictionary tfidfDict = new TFIDFDictionary();
            tfidfDict.LoadFromDB();

            BoWModelDB docDB = new BoWModelDB(wordDict);
            docDB.LoadFromDBByDataSet("doc_set_cls_1000");

            PModel.PrecedenceModel pModel = new PModel.PrecedenceModel(tfidfDict, classLabelDict);
            pModel.DiscoverPrecedence();

            PrecedenceQuery pQuery = new PrecedenceQuery(pModel, wordDict, classLabelDict);
            pQuery.TestQuery(docDB);
        }
Beispiel #2
0
        static void InitDict()
        {
            classLabelDict = new ClassLabelDictionary();
            classLabelDict.LoadFromDB();

            wordDict = new WordDictionary();
            wordDict.LoadFromDB();
        }