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 "io/mmap_file.h"
16 #include "util/disk_vector.h"
17 
18 namespace meta
19 {
20 namespace index
21 {
22 
30 {
31  public:
36  string_list(const std::string& path);
37 
41  string_list(string_list&&) = default;
42 
46  string_list& operator=(string_list&&) = default;
47 
52  const char* at(uint64_t idx) const;
53 
57  uint64_t size() const;
58 
59  private:
62 
65 };
66 }
67 }
68 #endif
uint64_t size() const
Definition: string_list.cpp:24
const char * at(uint64_t idx) const
Definition: string_list.cpp:19
Memory maps a text file readonly.
Definition: mmap_file.h:24
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:61
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition: analyzer.h:24
util::disk_vector< uint64_t > index_
An index that gives the starting byte for each index.
Definition: string_list.h:64
A class designed for reading large lists of strings that have been persisted to disk.
Definition: string_list.h:29