Initial import into git.
[galago.git] / cpp / galago / include / VocabularyReader.hpp
blob836fd9fb7575fa9a31cb60bc5b852192ea6ad162
2 //
3 // VocabularyReader
4 //
5 // 5 January 2007 -- tds
6 //
8 #ifndef GALAGO_VOCABULARYREADER_HPP
9 #define GALAGO_VOCABULARYREADER_HPP
11 #include <vector>
12 #include <string>
13 #include "indri/indri-platform.h"
14 #include "UncompressedRead.hpp"
16 class VocabularyReader {
17 public:
18 struct TermSlot {
19 const char* term;
20 UINT64 begin;
21 UINT64 length;
24 private:
25 std::vector<TermSlot> slots;
27 public:
28 ~VocabularyReader();
29 void read( const std::string& fileName, UINT64 invertedFileLength );
30 const TermSlot& operator[] ( const std::string& term ) const;
31 const TermSlot& get( const std::string& term ) const;
34 #endif