Skip to content
Snippets Groups Projects
Commit 996823e3 authored by Adam Wardynski's avatar Adam Wardynski
Browse files

No change happens if wclass to replace is same as original.

parent c99e4150
Branches
No related merge requests found
......@@ -15,7 +15,7 @@ Bool Relabel::execute(const ActionExecContext& context) const
token.lexemes().clear();
foreach (Corpus2::Lexeme& lexeme, original) {
token.add_lexeme(lexeme);
if (condition_->apply(context)->get_value()) {
if ((lexeme.tag().get_pos() != replace_wclass) && condition_->apply(context)->get_value()) {
changed.set_value(true);
lexeme.set_tag(Corpus2::Tag(replace_wclass, lexeme.tag().get_values()));
}
......
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