Package org.apache.commons.io.input

Examples of org.apache.commons.io.input.CharSequenceReader


  }

  @Test
  public void loadReader() throws IOException {
    final LineHandler lh = buildLineHandler(limit, line);
    final Reader r = new CharSequenceReader(buildInput(limit, line));

    final RecordLoader loader = new RecordLoader();
    loader.load(r, lh);
  }
View Full Code Here


            throw new IllegalArgumentException(
                    "Illegal input char(s) at following positions: "
                    + badIndexes);
        //if (sb.length() > 0 && sb.charAt(sb.length()-1) != '\n')
            //sb.append('\n');
        return new CreoleScanner(new CharSequenceReader(sb));
    }
View Full Code Here

            throw new IllegalArgumentException(
                    "Illegal input char(s) at following positions: "
                    + badIndexes);
        //if (sb.length() > 0 && sb.charAt(sb.length()-1) != '\n')
            //sb.append('\n');
        return new CreoleScanner(new CharSequenceReader(sb));
    }
View Full Code Here

                + "Please report this on the dev@apache.stanbol.org or create an "
                + "JIRA issue about this.");
        }
        if(!at.getSentences().hasNext()) { //no sentences  ... use this engine to detect
            //first the sentences
            TokenStream sentences = new SentenceTokenizer(new CharSequenceReader(at.getText()));
            try {
                while(sentences.incrementToken()){
                    OffsetAttribute offset = sentences.addAttribute(OffsetAttribute.class);
                    Sentence s = at.addSentence(offset.startOffset(), offset.endOffset());
                    if(log.isTraceEnabled()) {
View Full Code Here

                + "indicates an Bug in the used EnhancementJobManager implementation. "
                + "Please report this on the dev@apache.stanbol.org or create an "
                + "JIRA issue about this.");
        }
        //first the sentences
        TokenStream sentences = new SentenceTokenizer(new CharSequenceReader(at.getText()));
        try {
          sentences.reset();
            while(sentences.incrementToken()){
                OffsetAttribute offset = sentences.addAttribute(OffsetAttribute.class);
                Sentence s = at.addSentence(offset.startOffset(), offset.endOffset());
View Full Code Here

     */
    private int tag(final AnalysedText at, final TaggingSession session,
            final Corpus corpus, final Map<int[],Tag> tags) throws IOException {
        final OpenBitSet matchDocIdsBS = new OpenBitSet(session.getSearcher().maxDoc());
        TokenStream baseTokenStream = corpus.getTaggingAnalyzer().tokenStream("",
            new CharSequenceReader(at.getText()));
        LinkableTokenFilter linkableTokenFilter = new LinkableTokenFilter(baseTokenStream,
            at, session.getLanguage(), tpConfig.getConfiguration(session.getLanguage()),
            elConfig.getMinChunkMatchScore(), elConfig.getMinFoundTokens());
        //we use two TagClusterReducer implementations.
        // (1) the linkableTokenFilter filters all tags that do not overlap any
View Full Code Here

                + "indicates an Bug in the used EnhancementJobManager implementation. "
                + "Please report this on the dev@apache.stanbol.org or create an "
                + "JIRA issue about this.");
        }
        //start with the Tokenizer
        TokenStream tokenStream = tokenizerFactory.create(new CharSequenceReader(at.getText()));
        //build the analyzing chain by adding all TokenFilters
        for(TokenFilterFactory filterFactory : filterFactories){
            tokenStream = filterFactory.create(tokenStream);
        }
View Full Code Here

            throw new IllegalArgumentException(
                    "Illegal input char(s) at following positions: "
                    + badIndexes);
        //if (sb.length() > 0 && sb.charAt(sb.length()-1) != '\n')
            //sb.append('\n');
        return new CreoleScanner(new CharSequenceReader(sb));
    }
View Full Code Here

            throw new IllegalArgumentException(
                    "Illegal input char(s) at following positions: "
                    + badIndexes);
        //if (sb.length() > 0 && sb.charAt(sb.length()-1) != '\n')
            //sb.append('\n');
        return new CreoleScanner(new CharSequenceReader(sb));
    }
View Full Code Here

            throw new IllegalArgumentException(
                    "Illegal input char(s) at following positions: "
                    + badIndexes);
        //if (sb.length() > 0 && sb.charAt(sb.length()-1) != '\n')
            //sb.append('\n');
        return new CreoleScanner(new CharSequenceReader(sb));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.io.input.CharSequenceReader

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.