Examples of Modifier


Examples of org.apache.beehive.netui.compiler.typesystem.declaration.Modifier

            StringTokenizer tok = new StringTokenizer( getDelegateXProgramElement().getModifiers() );
           
            while ( tok.hasMoreTokens() )
            {
                String modifierString = tok.nextToken();
                Modifier modifier = ( Modifier ) MODIFIERS.get( modifierString );
                assert modifier != null : "unrecognized modifier: " + modifierString;
                modifiers.add( modifier );
            }
           
            _modifiers = modifiers;
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.Modifier

      else {
        continue; // neither of the arguments is an entity mention; probably an annotation error
      }
     
      // create a modifier object and add it to the cas
      Modifier modifier = null;
      if(spanToModifier.containsKey(modifierSpan)) {
        // an modifier with the same span has already been added to the cas
        modifier = spanToModifier.get(modifierSpan);
      }
      else {
        // this entity needs to be addded to the cas
        modifier = new Modifier(jCas, modifierSpan.start, modifierSpan.end);
        modifier.setTypeID(modifierType);
        modifier.setId(identifiedAnnotationId++);
        modifier.setDiscoveryTechnique(CONST.NE_DISCOVERY_TECH_GOLD_ANNOTATION);
        modifier.setConfidence(1);
        modifier.addToIndexes();
        spanToModifier.put(modifierSpan, modifier);
      }
     
      // create an entity mention object and add it to the cas
      EntityMention entityMention = null;
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.Modifier

        modifier.removeFromIndexes();
      }

      // copy over the manually annotated Modifiers
      for (Modifier goldModifier : JCasUtil.select(goldView, Modifier.class)) {
        Modifier modifier = new Modifier(jCas, goldModifier.getBegin(), goldModifier.getEnd());
        modifier.setTypeID(goldModifier.getTypeID());
        modifier.setId(goldModifier.getId());
        modifier.setDiscoveryTechnique(goldModifier.getDiscoveryTechnique());
        modifier.setConfidence(goldModifier.getConfidence());
        modifier.addToIndexes();
      }
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.Modifier

        // TODO

      } else if ("generic_class".equals(annotation.type)) {
        // TODO: there's currently no Generic in the type system
        boolean value = booleanSlots.remove("generic_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("severity_class".equals(annotation.type)) {
        Severity severity = new Severity(jCas);
        severity.setValue(stringSlots.remove("severity_normalization"));
        severity.addToIndexes();
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(severity);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("conditional_class".equals(annotation.type)) {
        // TODO: there's currently no Conditional in the type system
        boolean value = booleanSlots.remove("conditional_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("course_class".equals(annotation.type)) {
        Course course = new Course(jCas);
        course.setValue(stringSlots.remove("course_normalization"));
        course.addToIndexes();
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(course);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("uncertainty_indicator_class".equals(annotation.type)) {
        // TODO: there's currently no Uncertainty in the type system
        String value = stringSlots.remove("uncertainty_indicator_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("distal_or_proximal".equals(annotation.type)) {
        // TODO: there's currently no Distal or Proximal in the type system
        String value = stringSlots.remove("distal_or_proximal_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Person".equals(annotation.type)) {
        // TODO: there's currently no Subject in the type system
        String value = stringSlots.remove("subject_normalization_CU");
        // TODO: what does a code mean on a Person?
        String code = stringSlots.remove("associatedCode");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("body_side_class".equals(annotation.type)) {
        BodySide bodySide = new BodySide(jCas);
        bodySide.setValue(stringSlots.remove("body_side_normalization"));
        bodySide.addToIndexes();
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(bodySide);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("negation_indicator_class".equals(annotation.type)) {
        // TODO: there's currently no Negation in the type system
        String value = stringSlots.remove("negation_indicator_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("historyOf_indicator_class".equals(annotation.type)) {
        // TODO: there's currently no HistoryOf in the type system
        String value = stringSlots.remove("historyOf_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("superior_or_inferior".equals(annotation.type)) {
        // TODO: there's currently no Superior or Inferior in the type system
        String value = stringSlots.remove("superior_or_inferior_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("medial_or_lateral".equals(annotation.type)) {
        // TODO: there's currently no Medial or Lateral in the type system
        String value = stringSlots.remove("medial_or_lateral_normalization");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Route".equals(annotation.type)) {
        // TODO: there's currently no Route in the type system
        String value = stringSlots.remove("route_values");
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("Clinical_attribute".equals(annotation.type)) {
        // TODO: what does this even mean?
        Modifier modifier = new Modifier(jCas, coveringSpan.begin, coveringSpan.end);
        // modifier.setNormalizedForm(...);
        idAnnotationMap.put(annotation.id, modifier);

      } else if (eventRelationTypes.contains(annotation.type)) {
        // store the ALINK information for later, once all annotations are in the CAS
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.Modifier

    engine.process(jCas);

    // test the modifier annotator
    Collection<Modifier> modifiers = JCasUtil.select(jCas, Modifier.class);
    assertEquals(1, modifiers.size());
    Modifier slight = modifiers.iterator().next();
    assertEquals("slight", slight.getCoveredText());

    // test the relation annotators
    Collection<BinaryTextRelation> relations = JCasUtil.select(jCas, BinaryTextRelation.class);
    assertEquals(2, relations.size());
    Iterator<BinaryTextRelation> iterator = relations.iterator();
View Full Code Here

Examples of org.apache.james.jspf.core.Modifier

                String modifierString = termMatcher
                        .group(TERM_STEP_REGEX_MODIFIER_POS);

                if (modifierString != null) {
                    // MODIFIER
                    Modifier mod = (Modifier) lookupAndCreateTerm(termMatcher,
                            TERM_STEP_REGEX_MODIFIER_POS);

                    if (mod.enforceSingleInstance()) {
                        Iterator it = result.getModifiers().iterator();
                        while (it.hasNext()) {
                            if (it.next().getClass().equals(mod.getClass())) {
                                throw new PermErrorException("More than one "
                                        + modifierString
                                        + " found in SPF-Record");
                            }
                        }
View Full Code Here

Examples of org.apache.james.jspf.terms.Modifier

                String modifierString = termMatcher
                        .group(TERM_STEP_REGEX_MODIFIER_POS);

                if (modifierString != null) {
                    // MODIFIER
                    Modifier mod = (Modifier) lookupAndCreateTerm(termMatcher,
                            TERM_STEP_REGEX_MODIFIER_POS);

                    if (mod.enforceSingleInstance()) {
                        Iterator<Modifier> it = result.getModifiers().iterator();
                        while (it.hasNext()) {
                            if (it.next().getClass().equals(mod.getClass())) {
                                throw new PermErrorException("More than one "
                                        + modifierString
                                        + " found in SPF-Record");
                            }
                        }
View Full Code Here

Examples of org.apache.jmeter.config.Modifier

  private void configureWithModifiers(Sampler sam,List modifiers)
  {
    Iterator iter = modifiers.iterator();
    while(iter.hasNext())
    {
      Modifier mod = (Modifier)iter.next();
      TestElement cloned = (TestElement)cloneIfNecessary(mod);
      if(objectsWithFunctions.contains(mod))
      {
        replaceValues(cloned);
      }
View Full Code Here

Examples of org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

  private static BooleanClause.Occur getModifierValue(QueryNode node)
      throws QueryNodeException {

    if (node instanceof ModifierQueryNode) {
      ModifierQueryNode mNode = ((ModifierQueryNode) node);
      Modifier modifier = mNode.getModifier();

      if (Modifier.MOD_NONE.equals(modifier)) {
        return BooleanClause.Occur.SHOULD;

      } else if (Modifier.MOD_NOT.equals(modifier)) {
View Full Code Here

Examples of org.apache.lucene.queryparser.flexible.core.nodes.ModifierQueryNode.Modifier

  @Override
  protected QueryNode preProcessNode(final QueryNode node)
  throws QueryNodeException {

    if (node instanceof ModifierQueryNode) {
      final Modifier mod = ((ModifierQueryNode) node).getModifier();
      if (mod == Modifier.MOD_REQ) {
        this.hasUnaryReqOperator = true;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.