From 996823e328be443469daca91b39e2c7da6a7c060 Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(B-4.4.46a)> Date: Thu, 13 Jan 2011 12:16:25 +0100 Subject: [PATCH] No change happens if wclass to replace is same as original. --- libwccl/ops/actions/relabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libwccl/ops/actions/relabel.cpp b/libwccl/ops/actions/relabel.cpp index 46a7ed4..e741515 100644 --- a/libwccl/ops/actions/relabel.cpp +++ b/libwccl/ops/actions/relabel.cpp @@ -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())); } -- GitLab