From 5c66f5fa4cb5431f09f59eb28d3fa648290239f0 Mon Sep 17 00:00:00 2001 From: ilor <kailoran@gmail.com> Date: Sat, 26 Feb 2011 10:27:32 +0100 Subject: [PATCH] fix out of chunk tokens --- libcorpus2/io/xmlreader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libcorpus2/io/xmlreader.cpp b/libcorpus2/io/xmlreader.cpp index a9b8e0c..0af9d16 100644 --- a/libcorpus2/io/xmlreader.cpp +++ b/libcorpus2/io/xmlreader.cpp @@ -85,11 +85,12 @@ void XmlReader::on_start_element(const Glib::ustring &name, std::cerr << "Warning: out-of-chunk token, assuming sentence start on line "; std::cerr << this->context_->input->line << "\n"; } - chunkless_ = true; - out_of_chunk_ = true; AttributeList fake; start_chunk(fake); + fake.push_back(Attribute("type", "s")); start_sentence(fake); + chunkless_ = true; + out_of_chunk_ = true; start_token(attributes); } else if (state_ == STATE_NONE && name == "cesAna") { //nop -- GitLab