Package com.clearnlp.segmentation

Examples of com.clearnlp.segmentation.AbstractSegmenter


      s_line  = line;
    }
   
    public String call()
    {
      AbstractSegmenter segmenter = NLPGetter.getSegmenter(s_language, NLPGetter.getTokenizer(s_language));
      BufferedReader reader = new BufferedReader(new StringReader(s_line));
      StringBuilder build = new StringBuilder();
     
      for (List<String> tokens : segmenter.getSentences(reader))
      {
        if (tokens.size() < 3continue;
        build.append(UTArray.join(tokens, "\n"));
        build.append("\n\n");
      }
View Full Code Here


    String language = getLanguage(eConfig);
    String readerType = reader.getType();
    boolean bTwit = isTwit(eConfig);
    PrintStream fout;
   
    AbstractSegmenter segmenter = readerType.equals(AbstractReader.TYPE_RAW? getSegmenter(eConfig, bTwit) : null;
    AbstractTokenizer tokenizer = readerType.equals(AbstractReader.TYPE_LINE) ? getTokenizer(eConfig, bTwit) : null;
    AbstractComponent[] components = null;
   
    if (modelFile != null && !modelFile.equals(UNConstant.EMPTY))
    {
View Full Code Here

    initArgs(args);
   
    try
    {
      AbstractTokenizer tokenizer = NLPGetter.getTokenizer(s_language);
      AbstractSegmenter segmenter = i_format.equals(AbstractReader.TYPE_RAW) ? NLPGetter.getSegmenter(s_language, tokenizer) : null;
      List<String[]>    filenames = getFilenames(s_inputPath, s_inputExt, s_outputExt);
      boolean outLine = o_format.equals(AbstractReader.TYPE_LINE);
      tokenizer.setTwit(b_twit);
     
      for (String[] io : filenames)
View Full Code Here

TOP

Related Classes of com.clearnlp.segmentation.AbstractSegmenter

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.