Esempio n. 1
0
 public TripleStoreFromEnglish(IEnglishFactiodEngine englishFactiodStore, AltBot theBot, WordExpander expander)
 {
     EntityFilter        = this;
     TheBot              = theBot;
     EnglishFactiodStore = englishFactiodStore;
     WordNetExpand       = expander;
     AddDefaultExclusions();
 }
Esempio n. 2
0
        public WebGetFactiodEngine(IEnglishFactiodEngine fallback, AltBot AltBot)
        {
            TheBot   = AltBot;
            assertTo = fallback;
// ReSharper disable DoNotCallOverridableMethodsInConstructor
            string named = GetServiceName();

// ReSharper restore DoNotCallOverridableMethodsInConstructor

            TheBot.AddExcuteHandler(named, AskTextString);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="indexDir"></param>
        /// <param name="fieldName">usually "TEXT_MATTER"</param>
        public MyLuceneIndexer(string indexDir, string fieldName, AltBot myBot, WordNetEngine myWNEngine)
        {
            SearchSources = new List <IDocSearch>()
            {
                this
            };
            _indexDir     = indexDir;
            _fieldName    = fieldName;
            TheBot        = myBot;
            wordNetEngine = myWNEngine;
            IEnglishFactiodEngine assertTo = this;

            SearchSources.Add(new TrueKnowledgeFactiodEngine(assertTo, TheBot));
            SearchSources.Add(new AskDotComFactiodEngine(assertTo, TheBot));
            SearchSources.Add(new WikiAnswersFactoidEngine(assertTo, TheBot));
            TheBot.AddExcuteHandler("asklucene", AskTextStringJustHere);
            TheBot.AddExcuteHandler("askall", AskTextStringAll);
            //WNUser2Cache();

            //_path = new System.IO.FileInfo(indexDir);
            //_directory = new RAMDirectory();
            _analyzer = new StandardAnalyzer();
            try
            {
                InitDatabase();
            }
            catch (Exception e)
            {
                writeToLog("ERROR {0}", e);
                IsDbPresent = false;
                if (_directory == null)
                {
                    // in ram because of disk error?!
                    _directory = new RAMDirectory();
                }
            }
            TripleStoreProxy = new TripleStoreFromEnglish(this, TheBot, WordNetExpand);
            EntityFilter     = TripleStoreProxy.EntityFilter;
        }
 public AskDotComFactiodEngine(IEnglishFactiodEngine fallback, AltBot AltBot) : base(fallback, AltBot)
 {
 }
 public WikiAnswersFactoidEngine(IEnglishFactiodEngine fallback, AltBot AltBot) : base(fallback, AltBot)
 {
 }
Esempio n. 6
0
 public TrueKnowledgeFactiodEngine(IEnglishFactiodEngine fallback, AltBot AltBot)
     : base(fallback, AltBot)
 {
 }