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); }
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(); } }
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); }