From ee8ffaea6ad7dccd50a07d623aa5e00b078b3df3 Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Fri, 25 Feb 2011 10:21:24 +0100 Subject: [PATCH] flags in xmlreader --- libcorpus2/io/xmlreader.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libcorpus2/io/xmlreader.h b/libcorpus2/io/xmlreader.h index 4f48475..fe88533 100644 --- a/libcorpus2/io/xmlreader.h +++ b/libcorpus2/io/xmlreader.h @@ -43,6 +43,14 @@ public: disamb_sh_ = v; } + void set_warn_on_inconsistent(bool v) { + warn_on_inconsistent_ = v; + } + + void set_warn_on_unexpected(bool v) { + warn_on_unexpected_ = v; + } + protected: std::string get_type_from_attributes(const AttributeList& attributes) const; @@ -81,10 +89,13 @@ protected: static const int STATE_LEMMA = 6; static const int STATE_TAG = 7; + /// The state of the parser int state_; + /// Flag signyfying there was a sentence outside of a chunk bool chunkless_; + /// Flag signyfying there was a token outside of a sentence/chunk bool out_of_chunk_; /// Whitespace for the next token @@ -111,10 +122,13 @@ protected: /// Read Pantera-like disamb_sh diamb tag markings bool disamb_sh_; + /// Flag to control warning messages on state errors bool warn_on_inconsistent_; + /// Floag to control warning messages on unknown tags bool warn_on_unexpected_; + /// Tag name for sentence objects, customized in child class ctors std::string sentence_tag_name_; }; -- GitLab