Replies: 1 comment
-
This is something that is not supported by Pampac as it really is not a sequence pattern. Pampac supports checking is a metch occurs within an annotation but if the match itself is arbitrary and in any order this is not very efficient because it will check all possible pattern for being within some annotation. It is probably much easier to have a separate annotator for this which does it the other way round: go over each b an check if it has both a typ1 and typ2 within it. Your problem is a bit underspecified though: what if there are more than 1 annotation of typ1 and/or typ2? what if the typ1 and typ2 annotations overlap? Should both (or all) annotations just overlap with the same type "b" annotation or should they be fully contained with the same type "b" annotation? Can b annotations overlap or be contained within each other? To find all typ1 and typ2 annotations where at least one annotation of each type is fully contained within a b annotation and be annotations do not overlap, something like this could be used: (out of my head and untested)
Maybe this can be run as a separate annotator step, you can easily make an annotator out if this by creating an
|
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to find if two words from different types are in a same line. For lines I have annotation set as following:
doc.annset("Original markups").with_type("b")
I thought of something like this:
But it's not working because overlapping has to argument name, so I don't know how to specify same line.
Beta Was this translation helpful? Give feedback.
All reactions