Examples of CoveredTextExtractor


Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

    } catch (IOException e) {
      throw new ResourceInitializationException(e);
    }
   
    CombinedExtractor allExtractors = new CombinedExtractor(
        new CoveredTextExtractor(),
//        new TimeWordTypeExtractor(),
        charExtractors,
        new TypePathExtractor(BaseToken.class, "partOfSpeech"));
   
    featureExtractors = new ArrayList<SimpleFeatureExtractor>();
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

    CleartkExtractor tokenExtraction1 =
        new CleartkExtractor(
            BaseToken.class,
//            new FeatureFunctionExtractor(new CoveredTextExtractor(), new LowerCaseFeatureFunction()),
//            new FeatureFunctionExtractor(new CoveredTextExtractor(), new BrownClusterFeatureFunction()),
            new CoveredTextExtractor(),
            //new CleartkExtractor.Covered(),
            new CleartkExtractor.LastCovered(2),
            new CleartkExtractor.Preceding(5),
            new CleartkExtractor.Following(4),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(3)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(3)),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(5)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(5)),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(10)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(10))
            );
   
//    CleartkExtractor posExtraction1 =
//        new CleartkExtractor(
//            BaseToken.class,
//            new TypePathExtractor(BaseToken.class, "partOfSpeech"),
//            new CleartkExtractor.LastCovered(2),
//            new CleartkExtractor.Preceding(3),
//            new CleartkExtractor.Following(2)
//            );

    this.tokenCleartkExtractors.add(tokenExtraction1);
    //this.tokenCleartkExtractors.add(posExtraction1);
   
//    this.contextFeatureExtractors.add(new CleartkExtractor(IdentifiedAnnotation.class,
//        new CoveredTextExtractor(),
//        //new TypePathExtractor(IdentifiedAnnotation.class, "stem"),
//        new Preceding(2),
//        new Following(2)));
   
    // stab at dependency-based features
    //List<Feature> features = new ArrayList<Feature>();
    //ConllDependencyNode node1 = findAnnotationHead(jCas, arg1);

    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
    cuePhraseInWindowExtractor = new CleartkExtractor(
        BaseToken.class,
        new CoveredTextExtractor(),
        new CleartkExtractor.Bag(new CleartkExtractor.Covered())
//          AssertionCuePhraseAnnotation.class,
//          baseExtractorCuePhraseCategory,
//          new CleartkExtractor.Bag(new CleartkExtractor.Preceding(3)),
//          new CleartkExtractor.Bag(new CleartkExtractor.Following(3)),
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

        JCasUtil.indexCovered(jcas, Sentence.class, AssertionCuePhraseAnnotation.class);
   
    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
    CleartkExtractor cuePhraseInWindowExtractor =
        new CleartkExtractor(
              AssertionCuePhraseAnnotation.class,
              baseExtractorCuePhraseCategory,
              new CleartkExtractor.Bag(new CleartkExtractor.Preceding(5)),
              new CleartkExtractor.Bag(new CleartkExtractor.Following(5))
              );
//              new CleartkExtractor.Ngram(new CleartkExtractor.Preceding(5), new CleartkExtractor.Following(5)));
              //new CoveredTextExtractor(),
//              new CleartkExtractor.Covered());
//              new CleartkExtractor.Preceding(5),
//              new CleartkExtractor.Following(5));
   
    CleartkExtractor tokenExtraction1 =
        new CleartkExtractor(
            BaseToken.class,
            new CoveredTextExtractor(),
            //new CleartkExtractor.Covered(),
            new CleartkExtractor.LastCovered(2),
            new CleartkExtractor.Preceding(5),
            new CleartkExtractor.Following(4),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(10)),
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

        JCasUtil.indexCovered(jcas, Sentence.class, AssertionCuePhraseAnnotation.class);
   
    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

    CleartkExtractor tokenExtraction1 =
        new CleartkExtractor(
            BaseToken.class,
//            new FeatureFunctionExtractor(new CoveredTextExtractor(), new LowerCaseFeatureFunction()),
            new CoveredTextExtractor(),
            //new CleartkExtractor.Covered(),
            new CleartkExtractor.LastCovered(2),
            new CleartkExtractor.Preceding(5),
            new CleartkExtractor.Following(4),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(3)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(3)),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(5)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(5)),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(10)),
            new CleartkExtractor.Bag(new CleartkExtractor.Following(10))
            );
   
//    CleartkExtractor posExtraction1 =
//        new CleartkExtractor(
//            BaseToken.class,
//            new TypePathExtractor(BaseToken.class, "partOfSpeech"),
//            new CleartkExtractor.LastCovered(2),
//            new CleartkExtractor.Preceding(3),
//            new CleartkExtractor.Following(2)
//            );

    this.tokenCleartkExtractors.add(tokenExtraction1);
    //this.tokenCleartkExtractors.add(posExtraction1);
   
//    this.contextFeatureExtractors.add(new CleartkExtractor(IdentifiedAnnotation.class,
//        new CoveredTextExtractor(),
//        //new TypePathExtractor(IdentifiedAnnotation.class, "stem"),
//        new Preceding(2),
//        new Following(2)));
   
    // stab at dependency-based features
    //List<Feature> features = new ArrayList<Feature>();
    //ConllDependencyNode node1 = findAnnotationHead(jCas, arg1);

    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
    cuePhraseInWindowExtractor = new CleartkExtractor(
        BaseToken.class,
        new CoveredTextExtractor(),
        new CleartkExtractor.Bag(new CleartkExtractor.Covered())
//          AssertionCuePhraseAnnotation.class,
//          baseExtractorCuePhraseCategory,
//          new CleartkExtractor.Bag(new CleartkExtractor.Preceding(3)),
//          new CleartkExtractor.Bag(new CleartkExtractor.Following(3)),
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

        JCasUtil.indexCovered(jcas, Sentence.class, AssertionCuePhraseAnnotation.class);
   
    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

        JCasUtil.indexCovered(jcas, Sentence.class, AssertionCuePhraseAnnotation.class);
   
    CombinedExtractor baseExtractorCuePhraseCategory =
        new CombinedExtractor
          (
           new CoveredTextExtractor(),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhrase"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseCategory"),
           new TypePathExtractor(AssertionCuePhraseAnnotation.class, "cuePhraseAssertionFamily")
          );
   
    CleartkExtractor cuePhraseInWindowExtractor =
        new CleartkExtractor(
              AssertionCuePhraseAnnotation.class,
              baseExtractorCuePhraseCategory,
              new CleartkExtractor.Bag(new CleartkExtractor.Preceding(5)),
              new CleartkExtractor.Bag(new CleartkExtractor.Following(5))
              );
//              new CleartkExtractor.Ngram(new CleartkExtractor.Preceding(5), new CleartkExtractor.Following(5)));
              //new CoveredTextExtractor(),
//              new CleartkExtractor.Covered());
//              new CleartkExtractor.Preceding(5),
//              new CleartkExtractor.Following(5));
   
    CleartkExtractor tokenExtraction1 =
        new CleartkExtractor(
            BaseToken.class,
            new CoveredTextExtractor(),
            //new CleartkExtractor.Covered(),
            new CleartkExtractor.LastCovered(2),
            new CleartkExtractor.Preceding(5),
            new CleartkExtractor.Following(4),
            new CleartkExtractor.Bag(new CleartkExtractor.Preceding(10)),
View Full Code Here

Examples of org.cleartk.classifier.feature.extractor.simple.CoveredTextExtractor

    // a list of feature extractors that require only the token:
    // the stem of the word, the text of the word itself, plus
    // features created from the word text like character ngrams
    this.entityFeatureExtractors = Arrays.asList(
        new CoveredTextExtractor(),
        //new TypePathExtractor(IdentifiedAnnotation.class, "stem"),
        new ProliferatingExtractor(
            new SpannedTextExtractor(),
            new LowerCaseProliferator(),   
            new CapitalTypeProliferator(),
            new NumericTypeProliferator(),
            new CharacterNGramProliferator(fromRight, 0, 2),
            new CharacterNGramProliferator(fromRight, 0, 3)));

    // a list of feature extractors that require the token and the sentence
    this.contextFeatureExtractors = new ArrayList<ContextExtractor<IdentifiedAnnotation>>();
    this.contextFeatureExtractors.add(new ContextExtractor<IdentifiedAnnotation>(
        IdentifiedAnnotation.class,
        new CoveredTextExtractor(),
        //new TypePathExtractor(IdentifiedAnnotation.class, "stem"),
        new Preceding(2),
        new Following(2)));

    ContextExtractor<BaseToken> tokenContextExtractor1 = new ContextExtractor<BaseToken>(
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.