Class SentenceSource

java.lang.Object
org.languagetool.dev.dumpcheck.SentenceSource
All Implemented Interfaces:
Iterator<Sentence>
Direct Known Subclasses:
MixingSentenceSource, PlainTextSentenceSource, WikipediaSentenceSource

public abstract class SentenceSource extends Object implements Iterator<Sentence>
Source of sentences to be checked/indexed. Sub classes provide access to XML files or plain text sources.
Since:
2.4
  • Method Details

    • hasNext

      public abstract boolean hasNext()
      Specified by:
      hasNext in interface Iterator<Sentence>
    • next

      public abstract Sentence next()
      Return the next sentence. Sentences from the source are filtered by length to remove very short and very long sentences.
      Specified by:
      next in interface Iterator<Sentence>
    • getSource

      public abstract String getSource()
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<Sentence>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • acceptSentence

      protected boolean acceptSentence(String sentence)