From d631879609b4738494c433581b49bea4288db5c3 Mon Sep 17 00:00:00 2001 From: Johannes Heinecke Date: Sat, 29 Oct 2022 12:37:04 +0200 Subject: [PATCH] check for absent features/misc-keys --- CHANGES.md | 1 + doc/mass_editing.md | 7 ++++--- gui/index.html | 6 +++++- .../com/orange/labs/conllparser/Conditions.g4 | 8 ++++---- .../orange/labs/conllparser/CEvalVisitor.java | 18 +++++++++++++++--- .../com/orange/labs/conllparser/ConllWord.java | 4 ++-- 6 files changed, 31 insertions(+), 13 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0a689bf..df43947 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ * more tests for value access * added compatibility test `~` in addition to strict comparison with `=` * validator shortcut changed from `=` to `!` +* check for absent features/misc-keys ## Version 2.18.0 * extension to mass-edit/complex search&replace: possibility to search heads/childs etc with same Feature value or same UPOS etc diff --git a/doc/mass_editing.md b/doc/mass_editing.md index 3687a93..2137640 100644 --- a/doc/mass_editing.md +++ b/doc/mass_editing.md @@ -30,17 +30,18 @@ Examples: * `Id:` (Values: integer) * `MWT:` (Values: length of the multi-word token `[2-9]`) * `IsEmpty` (no value, true if the current node is empty) - * `IsMWT` (no value, true if the current node is empty) + * `IsMWT` (no value, true if the current node is a MWT) `Form:`, `Lemma:` and `Xpos:` can contain simple regular expression (only the character ')' cannot be used +In order to check for the absence of a given Featurename in the Feature or Misc column, use the following: + * `Feat:Gender:` true if the cyurrent word has no feature `Gender` `EUD` cannot deal (yet) with empty word ids (`n.m`) - `Lemma` and `Form` can have either a regex as argument or a filename of a file which contains a list of forms or lemmas: +`Lemma` and `Form` can have either a regex as argument or a filename of a file which contains a list of forms or lemmas: * `Lemma:sing.* > misc:"Value=Sing"` * `Lemma:#mylemmas.txt > misc:"Value=Sing"` (if the file `mylemmas.txt` does not exist, the condition is false) - In addition to key keys listed above, four functions are available to take the context of the token into account: * `child()` child of current token * `head()` head of current token diff --git a/gui/index.html b/gui/index.html index d7741a3..b8eb911 100644 --- a/gui/index.html +++ b/gui/index.html @@ -489,7 +489,11 @@

Complex search

  • IsEmpty (no value, true if the current node is empty)
  • IsMWT (no value, true if the current node is a multi token word)
  • - + In order to check for the absence of a given Featurename in the Feature or Misc column, use the following: + + In addition to key keys listed above, four functions are available to take the context of the token into account: