incubator-ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masanz, James J." <Masanz.Ja...@mayo.edu>
Subject RE: SHARPKnowtatorXMLReader and new type system
Date Fri, 15 Feb 2013 00:23:52 GMT

> -----Original Message-----
> From: ctakes-dev-return-1208-Masanz.James=mayo.edu@incubator.apache.org
> [mailto:ctakes-dev-return-1208-
> Masanz.James=mayo.edu@incubator.apache.org] On Behalf Of Steven Bethard
> Sent: Thursday, February 14, 2013 6:20 PM
> To: ctakes-dev@incubator.apache.org
> Subject: Re: SHARPKnowtatorXMLReader and new type system
> 
> On Feb 14, 2013, at 3:43 PM, "Masanz, James J." <Masanz.James@mayo.edu>
> wrote:
> > I'm not familiar with  the decisions behind ProcedureMethod, but
> > modeling after this fragment of code
> >
> >      } else if ("method_class".equals(annotation.type)) {
> >        String code = stringSlots.remove("associatedCode");
> >        ProcedureMethod method = new ProcedureMethod(jCas);
> >        method.setValue(code);
> >        ProcedureMethodModifier modifier = new
> ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
> >        modifier.setNormalizedForm(method);
> >
> > I would have picked (2)
> 
> Presumably if we pick (2), then we should also remove the .setValue
> methods from the Modifiers?

Makes sense to me

-- James Masanz

> > I'm also a little nervous about (3).
> >
> > Hopefully someone else will chime in.
> 
> Yeah, hopefully. =)
> 
> Steve
> 
> >
> > -- James
> >
> >> -----Original Message-----
> >> From:
> >> ctakes-dev-return-1206-Masanz.James=mayo.edu@incubator.apache.org
> >> [mailto:ctakes-dev-return-1206-Masanz.James=mayo.edu@incubator.apache
> >> .org]
> >> On Behalf Of Steven Bethard
> >> Sent: Thursday, February 14, 2013 2:27 PM
> >> To: ctakes-dev@incubator.apache.org
> >> Subject: SHARPKnowtatorXMLReader and new type system
> >>
> >> I was looking again at SHARPKnowtatorXMLReader, and I have some
> >> questions about how annotations should be loaded now that we have
> >> things like BodyLateralityModifier, ProcedureMethodModifier, etc. in
> the type system.
> >>
> >> Specifically, what should we be doing with the normalized form?
> >>
> >> Take for example, procedure methods. In the annotations, each
> >> "method_class" (procedure method) has an "associatedCode" string
> >> attribute. Should SHARPKnowtatorXMLReader
> >>
> >> (1) Just set the associated code on the modifier directly:
> >>
> >>        String code = stringSlots.remove("associatedCode");
> >>        ProcedureMethodModifier modifier = new
> >> ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
> >>        modifier.setValue(code);
> >>
> >> (2) Create an appropriate Attribute subclass, set the associated code
> >> there, and set the Attribute as the modifier's normalized form:
> >>
> >>        String code = stringSlots.remove("associatedCode");
> >>        ProcedureMethodModifier modifier = new
> >> ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
> >>        ProcedureMethod method = new ProcedureMethod(jCas);
> >>        method.setValue(code);
> >>        modifier.setNormalizedForm(method);
> >>
> >> (3) Both?
> >>
> >>        String code = stringSlots.remove("associatedCode");
> >>        ProcedureMethodModifier modifier = new
> >> ProcedureMethodModifier(jCas, coveringSpan.begin, coveringSpan.end);
> >>        modifier.setValue(code);
> >>        ProcedureMethod method = new ProcedureMethod(jCas);
> >>        method.setValue(code);
> >>        modifier.setNormalizedForm(method);
> >>
> >> I lean towards (3), but the duplication makes me a little nervous,
> >> like maybe I'm doing something wrong.
> >>
> >> Steve
> >


Mime
View raw message