Esempio n. 1
0
        public SearchEngine(SearchEngineConfig config)
        {
            mConfig      = config;
            mQueryParser = new SimpleQueryParser(new QueryParserConfig
            {
                TextSegmenter = config.TextSegmenter,
            });

            mRetriever = new InexactTopKRetriever(new RetrieverConfig
            {
                PostingListStore   = config.PostingListStore,
                UrlFileStore       = config.UrlFileStore,
                InvertedIndexStore = config.InvertedIndexStore,
            }, ResultSize);

            var rankerConfig = new RankerConfig
            {
                PostingListStore   = config.PostingListStore,
                UrlFileStore       = config.UrlFileStore,
                InvertedIndexStore = config.InvertedIndexStore,
            };

            mRanker    = new IntegratedRanker(rankerConfig);
            mProRanker = new QueryTermProximityRanker(rankerConfig);

            mLogger = new RuntimeLogger(Path.Combine(config.LogDirectory, "SearchEngine.Log"), true);
        }
 public IntegratedRanker(RankerConfig config)
 {
     mRankers = new List <IRanker>
     {
         new VectorSpaceModelRanker.VectorSpaceModelRanker(config),
         new DomainDepthRanker.DomainDepthRanker(config),
     };
 }
Esempio n. 3
0
 public VectorSpaceModelRanker(RankerConfig config)
 {
     mConfig = config;
 }
Esempio n. 4
0
 public QueryTermProximityRanker(RankerConfig config)
 {
     mConfig = config;
 }
Esempio n. 5
0
 public DomainDepthRanker(RankerConfig config)
 {
     mConfig = config;
 }