ModErn Text Analysis
META Enumerates Textual Applications
metadata_parser.h
Go to the documentation of this file.
1 
10 #ifndef META_CORPUS_METADATA_PARSER_H_
11 #define META_CORPUS_METADATA_PARSER_H_
12 
13 #include <fstream>
14 
15 #include "meta/config.h"
16 #include "meta/corpus/metadata.h"
18 #include "meta/util/optional.h"
19 
20 namespace meta
21 {
22 namespace corpus
23 {
24 
29 {
30  public:
36  metadata_parser(const std::string& filename, metadata::schema_type schema);
37 
41  std::vector<metadata::field> next();
42 
46  const metadata::schema_type& schema() const;
47 
48  private:
51 
53  metadata::schema_type schema_;
54 };
55 }
56 }
57 #endif
Reads metadata from the metadata file of a corpus according to a schema.
Definition: metadata_parser.h:28
metadata_parser(const std::string &filename, metadata::schema_type schema)
Creates the parser.
Definition: metadata_parser.cpp:18
metadata::schema_type schema_
the schema for the metadata being extracted
Definition: metadata_parser.h:53
A stupid wrapper around a std::fstream to work around GCC&#39;s libstdc++ lacking move constructors for s...
Definition: moveable_stream.h:93
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
std::vector< metadata::field > next()
Definition: metadata_parser.cpp:25
const metadata::schema_type & schema() const
Definition: metadata_parser.cpp:80
io::mifstream infile_
the parser used to extract metadata
Definition: metadata_parser.h:50