You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Peter Klügl (JIRA)" <de...@uima.apache.org> on 2013/02/06 11:05:13 UTC
[jira] [Commented] (UIMA-2640) SHIFT action does not copy
annotation features
[ https://issues.apache.org/jira/browse/UIMA-2640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572305#comment-13572305 ]
Peter Klügl commented on UIMA-2640:
-----------------------------------
Thanks for pointing this out. I totally forgot the features when I implemented the action. Your patch is really appreciated and you are welcome to submit more patches. However, I think there is even more broken.
Take a look at the following example, which should work (SHIFT is applied to reduce the offsets):
document = "only some text<br/>"
{noformat}
PACKAGE org.apache.uima;
DECLARE Annotation FS (Annotation doc, STRING lang);
Document{-> CREATE(FS, "doc" = Document, "lang" = "unknown")};
Document{ -> RETAINTYPE(MARKUP)};
W{STARTSWITH(FS) -> SHIFT(FS, 1, 2)} W+ MARKUP;
{noformat}
I will fix it, extend the documentation and add a test.
> SHIFT action does not copy annotation features
> ----------------------------------------------
>
> Key: UIMA-2640
> URL: https://issues.apache.org/jira/browse/UIMA-2640
> Project: UIMA
> Issue Type: Bug
> Components: TextMarker
> Affects Versions: 2.0.0TextMarker
> Reporter: Pablo Duboue (KeaText)
> Assignee: Peter Klügl
> Priority: Minor
> Labels: patch
> Attachments: shiftaction_copy_fs.patch
>
>
> The SHIFT action is really useful, but as currently implemented it creates a new annotation rather than extending the boundaries of the matched one (and re-indexing).
> I have a patch that copies the old features over (which I'll attach shortly), adapted from CasCopier.
> If the patch is not enough, at least the documentation for SHIFT needs to changed to warn about the current behavior.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira