From user-return-8090-archive-asf-public=cust-asf.ponee.io@uima.apache.org Thu Apr 18 21:12:42 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id AA5B218061A for ; Thu, 18 Apr 2019 23:12:41 +0200 (CEST) Received: (qmail 84569 invoked by uid 500); 18 Apr 2019 21:12:40 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 84553 invoked by uid 99); 18 Apr 2019 21:12:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2019 21:12:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C99E4C0B4A for ; Thu, 18 Apr 2019 21:12:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.001 X-Spam-Level: * X-Spam-Status: No, score=1.001 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fI0PMhbT_3no for ; Thu, 18 Apr 2019 21:12:37 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 95F125FB66 for ; Thu, 18 Apr 2019 21:12:37 +0000 (UTC) Received: from [192.168.0.79] ([95.208.248.246]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MlO5j-1gYEWh2njJ-00lqAU for ; Thu, 18 Apr 2019 23:12:30 +0200 Subject: Re: Flattening Annotations? To: user@uima.apache.org References: From: =?UTF-8?Q?Peter_Kl=c3=bcgl?= Openpgp: preference=signencrypt Message-ID: <4d8e293b-47cb-dc99-e5b3-ba5d2a8138da@averbis.com> Date: Thu, 18 Apr 2019 23:12:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:sqS0YZILREWgRMCVOYr7x2UdLbsV6EU+UnI/UpjJ0R9dzRAzTUG 0JGdkmjP9SakHYk6HyNkGFO7Qry0HH9TieXjnhtFJ/vbygQvtdFg+GUTrVXGk372WM/g0ZM cCxYUQ+n8pRSDtrNrPgsFmduPQfv6gZaf4cohgsGpoZGPp8tQtekoVMz3PmHAWaxP7y8Hbq BvuckFn67F9wSYbrVkf5A== X-UI-Out-Filterresults: notjunk:1;V03:K0:t2fkYOI1R/A=:BR8JXmDRKJ42ofq2NGsv86 XbY5zmeNKWLmLEwRqWMqU1tnDCzGjeE/jVFG9RyT0buEYcImO8p3zQEanAlKou5bVK27kbkBG hZdVvLYZJKneMA30cgnby/zw2pnAixmnxSSTHMDtWTQfL4unDbH7LbDN2AYYRFgmC4zvO4/cX wXwF96PizjjOYgmy5a+WWrZLUe3xUH/SX/XmiC9CFxQYh9fTSZXDSlRFvnTNDXfWBbn3S4PKu GTpsrfztV4YF++bgzODzePd6jFln47r+r7diF09UIq1IEfbEh4WD3l1Be75Xw6VvBCzVAS8x3 cRIVcpFJDhI2iLld2Ls7Baw5Ir714iI204ovVwSXxXI3Te7mAO7wPJpZgezVxq+Mj2cRIRm1w TbtrNFBRLuY6Hu6VUC1KMNZCe5xx1fYkelELEYHCziBYoI3Ud7x2L2s51VIyG5TqxbiXE1u15 4LDD+ByYeVuuanY6GiP4RONi2YZ49SZJ7uLWP2B0gEDzXK2Eh3RYa561hsBN/82JA7KtYhkR5 DwZN/UC2A6wx/S7gOEgAsLY9iEeOy9e17Cydk4Pj5h6FqBa6uHJR/WdU+XwQ507BuTmSEwc5a 6NsIsGBBHvgmDFqQ7w/xHIymkYuAOXOBXvPCh4mSsfHBrwbQUv9igYljQjW52vtflhzYHz2Xn 4P1H5URdMN+R0qTjQhjeGRyu00nYazZOpdVqr9QcRiSQn5zhT4m8vFMYnkDDWP8eOpCrzBddt QQbyqjq571yXD3Oxf0PshTtCcB62D9ZHntFS7kerFO2FtOuUBL/C7Qp0QMXc39Dd0i16pX86F QuGWH45 Hi, I normally use inlined rules as action for those use cases: NP -> {   np:NP{-> UNMARK(np)} ANY;   ANY np:@NP{-> UNMARK(np)};   }; It is longer, but faster... Best, Peter Am 16.04.2019 um 22:08 schrieb Nikolai Krot: > Hi all, > > Is there a quick way to remove all annotations of specific type if they are > embedded in a wider annotation of the same type, for example: > > ... ... ... > > needs to be flattened to just outermost > > ... ... ... > > At the moment I am doing it with the following (which seems to work and is > said to be slow) > > NP { PARTOFNEQ(NP) -> UNMARK(NP)}; > > Best regards, > Nikolai > -- Dr. Peter Klügl R&D Text Mining/Machine Learning Averbis GmbH Salzstr. 15 79098 Freiburg Germany Fon: +49 761 708 394 0 Fax: +49 761 708 394 10 Email: peter.kluegl@averbis.com Web: https://averbis.com Headquarters: Freiburg im Breisgau Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080 Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó