Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LIBMWEREADER_MWEREADER_H
#define LIBMWEREADER_MWEREADER_H
#include <libcorpus2/io/reader.h>
namespace Corpus2 {
class MWEReader: public TokenReader
{
public:
MWEReader(const Tagset& tagset, const std::string& filename);
~MWEReader();
Token* get_next_token();
Sentence::Ptr get_next_sentence();
boost::shared_ptr<Chunk> get_next_chunk();
void set_option(const std::string& option);
/**
* Option inspector. Should echo the option if it is set, return
* an empty string otheriwse, and "unknown" if the option is invalid.
*/
std::string get_option(const std::string& option) const;
/**
* Check if the reader is valid, should throw if not. Called after
* all set_options during factory reader creation.
*/
virtual void validate();
static bool registered;
};
} // ns Corpus2
#endif // LIBMWEREADER_MWEREADER_H