Skip to content
Snippets Groups Projects
Commit 053aac6c authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

fixed Tagset::split_tag

parent d5624615
Branches
No related merge requests found
......@@ -2,7 +2,7 @@ PROJECT(Corpus2Library)
set(corpus2_ver_major "1")
set(corpus2_ver_minor "0")
set(corpus2_ver_patch "12")
set(corpus2_ver_patch "13")
cmake_minimum_required(VERSION 2.8.0)
......
......@@ -557,12 +557,20 @@ std::vector<Tag> Tagset::split_tag(const Tag& tag) const
if ((v & vm).any()) {
if (dup) {
for (size_t i = 0; i < sz; ++i) {
tags.push_back(tags[i]);
Tag new_tag = tags[i];
mask_t new_vals = new_tag.get_values();
new_vals &= ~ma; // clear whole attr
new_vals ^= vm; // add just the new value
// tags[i].add_values(vm);
new_tag.set_values(new_vals);
tags.push_back(new_tag);
}
}
dup = true;
for (size_t i = 0; i < sz; ++i) {
tags[i].add_values(vm);
else {
dup = true;
for (size_t i = 0; i < sz; ++i) {
tags[i].add_values(vm);
}
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment