Exemple #1
0
        static void Main(string[] args)
        {
            IxStdDiskFwdIndex fwdIndex = new IxStdDiskFwdIndex(@"D:\indexes\enwiki\fwdIndex", IxIndexMode.READ);
            IxFwdDistDiskDict fwdDict = new IxFwdDistDiskDict(@"D:\indexes\enwiki\fwdDict", IxDictionaryMode.READ, null);

            IxHalCreator halCreator = new IxHalCreator(@"D:\indexes\enwiki\hal", @"K:\halTmp", fwdIndex, fwdDict, IxSettings.defaultHalWindow);

            Stopwatch timer = new Stopwatch();
            timer.Start();

            //halCreator.createHal();
            //halCreator.optimizeMatrix();
            halCreator.createHalIndex();
            //halCreator.calculateContext();
            //halCreator.createAllowedTokensIdsFile(@"K:\WordNet\index.noun");

            timer.Stop();

            Console.WriteLine("HALCreator: all jobs completed in {0}", timer.Elapsed);
            Console.ReadLine();
        }
 public IxTokenPositionBasedRank(string pathToIndexLocation)
 {
     _fwdDict = new IxFwdDistDiskDict(pathToIndexLocation + @"\fwdDict", IxDictionaryMode.READ, null);//tworzymy słownik wprzód, żeby na podstawie wartości tokena pobrać jego id
     _tokenPosIndex = new IxTokenPositionsIndex(pathToIndexLocation);
     _tokenizer = new IxTokenizer(_fwdDict);
 }