예제 #1
0
        private bool LoadModels(QueryProcessorSettings settingsIn)
        {
            bool ret = LoadPartOfSpeechTagger(DefaultModelFileLocations.POS_TAGGER_ENG_FILE);

            ret &= LoadKeywordPredictor(DefaultModelFileLocations.NAIVE_BAYES_KEYWORD_PREDICTOR_FILE);
            ret &= LoadKeywordClusterer(DefaultModelFileLocations.KEYWORD_SIMILARITY_CLUSTERER_FILE);
            ret &= LoadProblemPredictor(DefaultModelFileLocations.KNN_QUERY_PROBLEM_PREDICTOR_FILE);
            return(ret);
        }
예제 #2
0
        public QueryProcessor(QueryProcessorSettings settingsIn)
        {
            if (!settingsIn.IsComplete())
            {
                throw new ArgumentException("Settings was not fully filled out prior to attempted use");
            }
            DataSource = settingsIn.DataSource;

            if (!LoadModels(settingsIn))
            {
                RestoreModels();
            }
        }
예제 #3
0
        public static QueryProcessorSettings GenerateDefaultSettings()
        {
            QueryProcessorSettings ret = new QueryProcessorSettings();

            ret.TaggerFilePath           = "";
            ret.KeywordPredictorFilePath = "";
            ret.KeywordPredictorIdString = "";
            ret.KeywordClustererFilePath = "";
            ret.KeywordClustererIdString = "";
            ret.ProblemPredictorFilePath = "";
            ret.ProblemPredictorIdString = "";
            ret.DataSource = new FileSystemDataSource();
            return(ret);
        }