ModErn Text Analysis
META Enumerates Textual Applications
string_list.h
Go to the documentation of this file.
1 
10 #ifndef META_STRING_LIST_H_
11 #define META_STRING_LIST_H_
12 
13 #include <string>
14 
15 #include "meta/config.h"
16 #include "meta/io/mmap_file.h"
17 #include "meta/util/disk_vector.h"
18 
19 namespace meta
20 {
21 namespace index
22 {
23 
31 {
32  public:
37  string_list(const std::string& path);
38 
42  string_list(string_list&&) = default;
43 
47  string_list& operator=(string_list&&) = default;
48 
53  const char* at(uint64_t idx) const;
54 
58  uint64_t size() const;
59 
60  private:
63 
66 };
67 }
68 }
69 #endif
Memory maps a text file readonly.
Definition: mmap_file.h:27
string_list(const std::string &path)
Constructs the string list.
Definition: string_list.cpp:13
string_list & operator=(string_list &&)=default
Move assigns a string list.
io::mmap_file string_file_
The file containing the strings.
Definition: string_list.h:62
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retrieval, data mining, and other applications of text processing.
Definition: analyzer.h:25
uint64_t size() const
Definition: string_list.cpp:24
util::disk_vector< uint64_t > index_
An index that gives the starting byte for each index.
Definition: string_list.h:65
const char * at(uint64_t idx) const
Definition: string_list.cpp:19
A class designed for reading large lists of strings that have been persisted to disk.
Definition: string_list.h:30