Ejemplo 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);
        }
Ejemplo n.º 2
0
 public IntegratedRanker(RankerConfig config)
 {
     mRankers = new List <IRanker>
     {
         new VectorSpaceModelRanker.VectorSpaceModelRanker(config),
         new DomainDepthRanker.DomainDepthRanker(config),
     };
 }
Ejemplo n.º 3
0
 public VectorSpaceModelRanker(RankerConfig config)
 {
     mConfig = config;
 }
Ejemplo n.º 4
0
 public QueryTermProximityRanker(RankerConfig config)
 {
     mConfig = config;
 }
Ejemplo n.º 5
0
 public DomainDepthRanker(RankerConfig config)
 {
     mConfig = config;
 }