Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2048C10C2B for ; Thu, 6 Feb 2014 13:18:50 +0000 (UTC) Received: (qmail 90506 invoked by uid 500); 6 Feb 2014 13:18:48 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 89819 invoked by uid 500); 6 Feb 2014 13:18:46 -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 89798 invoked by uid 99); 6 Feb 2014 13:18:45 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 13:18:45 +0000 Received: from localhost (HELO highfire.ukp.informatik.tu-darmstadt.de) (127.0.0.1) (smtp-auth username rec, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 13:18:45 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: Dictionary annotator - added parameter to make analysis on different SOFAs From: Richard Eckart de Castilho In-Reply-To: Date: Thu, 6 Feb 2014 14:18:42 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7BCC58A9-387B-4D0C-8C57-B1C0C8EB0C22@apache.org> To: user@uima.apache.org X-Mailer: Apple Mail (2.1510) On 06.02.2014, at 12:02, Luca Foppiano wrote: > On Tue, Feb 4, 2014 at 10:40 PM, Richard Eckart de Castilho > wrote: >=20 > [...] >=20 >=20 >> The correct mapping for the dictionaryEngine should be >>=20 >> builder.add(dictionaryEngine, >> CAS.NAME_DEFAULT_SOFA, SimpleParserAE.SOFA_NAME_TEXT_ONLY); >>=20 >> so the SOFA_NAME_TEXT_ONLY is supplied as the default view to the >> dictionaryEngine. >>=20 >> Similarly, it should be possible to remove the view parameter from >> whitespaceEngine and the getView call from the consumer and use these >> mappings: >>=20 >> builder.add(preparationEngine); >> builder.add(whitespaceEngine, >> CAS.NAME_DEFAULT_SOFA, SimpleParserAE.SOFA_NAME_TEXT_ONLY); >> builder.add(dictionaryEngine, >> CAS.NAME_DEFAULT_SOFA, SimpleParserAE.SOFA_NAME_TEXT_ONLY); >> builder.add(casConsumer, >> CAS.NAME_DEFAULT_SOFA, SimpleParserAE.SOFA_NAME_TEXT_ONLY); >>=20 >>=20 > Thanks! With your help I managed to made it works. >=20 > So, to see if I've understood: > I have annotator A that read from the "initial view" and write in = the > view 'BAO' (hardcoded inside the annotator) I could remap the sofa in = this > way: >=20 > builder.add(myAnnotator, > CAS.NAME_DEFAULT_SOFA, "MyNewFancySofaInput", > "BAO", "MyNewFancySofaOutput") Yep - sounds right. I'd probably do the naming a bit different though. What is input and output changes from component to component. So I'd = used other names on the pipeline level, e.g. RAW_DATA EXTRACTED_TEXT TRANSLATED_TEXT I'd hardcode simple names like "INPUT" and "OUTPUT" in the components and then map these to the pipeline-level-names: builder.add(TextExtractor, "INPUT", "RAW_DATA", "OUTPUT", "EXTRACTED_TEXT"); builder.add(Parser, CAS.NAME_DEFAULT_SOFA, "EXTRACTED_TEXT"); builder.add(Translator, "INPUT", "EXTRACTED_TEXT", "OUTPUT", "TRANSLATED_TEXT"); etc. Since it is currently not possible in uimaFIT to use view mappings with readers, I'd probably substitute RAW_TEXT with = CAS.NAME_DEFAULT_SOFA, so that the reader can just dump its data into the default view. builder.add(TextExtractor, "INPUT", CAS.NAME_DEFAULT_SOFA, "OUTPUT", "EXTRACTED_TEXT"); builder.add(Parser, CAS.NAME_DEFAULT_SOFA, "EXTRACTED_TEXT"); builder.add(Translator, "INPUT", "EXTRACTED_TEXT", "OUTPUT", "TRANSLATED_TEXT"); > I have to say this feature is quite interesting but in fact the type > systems are the components generating the real pain=85 :) What's the pain with the type systems? Cheers, -- Richard