Package org.apache.ctakes.core.sentence

Examples of org.apache.ctakes.core.sentence.SentenceDetectorCtakes


    } else {
      EndOfSentenceScannerImpl eoss = new EndOfSentenceScannerImpl();
      char[] eosc = eoss.getEndOfSentenceCharacters();
      // SentenceDContextGenerator cg = new SentenceDContextGenerator();
      DefaultSDContextGenerator cg = new DefaultSDContextGenerator(eosc);
      sentenceDetector = new SentenceDetectorCtakes(mmResrc.getModel(), cg, eoss);
    }

    skipSegmentsSet = ParamUtil.getStringParameterValuesSet(
        PARAM_SEGMENTS_TO_SKIP, context);
  }
View Full Code Here


      is.close();
      EndOfSentenceScannerImpl eoss = new EndOfSentenceScannerImpl();
      char[] eosc = eoss.getEndOfSentenceCharacters();
      // SentenceDContextGenerator cg = new SentenceDContextGenerator();
      DefaultSDContextGenerator cg = new DefaultSDContextGenerator(eosc);
      sentenceDetector = new SentenceDetectorCtakes(
          sdmodel.getMaxentModel(), cg, eoss);

      skipSegmentsSet = ParamUtil.getStringParameterValuesSet(
          PARAM_SEGMENTS_TO_SKIP, context);
      // vng change begin
View Full Code Here

    try (InputStream is = FileLocator.getAsStream(sdModelPath)){
      logger.info("Sentence detector model file: " + sdModelPath);
      sdmodel = new SentenceModel(is);
      EndOfSentenceScannerImpl eoss = new EndOfSentenceScannerImpl();
      DefaultSDContextGenerator cg = new DefaultSDContextGenerator(eoss.getEndOfSentenceCharacters());
      sentenceDetector = new SentenceDetectorCtakes(
          sdmodel.getMaxentModel(), cg, eoss);

      skipSegmentsSet = new HashSet<>();
      if(skipSegmentsArray != null){
        Collections.addAll(skipSegmentsSet, skipSegmentsArray);
View Full Code Here

      is.close();
      EndOfSentenceScannerImpl eoss = new EndOfSentenceScannerImpl();
      char[] eosc = eoss.getEndOfSentenceCharacters();
      // SentenceDContextGenerator cg = new SentenceDContextGenerator();
      DefaultSDContextGenerator cg = new DefaultSDContextGenerator(eosc);
      sentenceDetector = new SentenceDetectorCtakes(
          sdmodel.getMaxentModel(), cg, eoss);

      skipSegmentsSet = ParamUtil.getStringParameterValuesSet(
          PARAM_SEGMENTS_TO_SKIP, context);
  }
View Full Code Here

TOP

Related Classes of org.apache.ctakes.core.sentence.SentenceDetectorCtakes

Copyright © 2018 www.massapicom. 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.