Class SequenceVectors.AsyncSequencer

  • All Implemented Interfaces:
    Runnable
    Enclosing class:
    SequenceVectors<T extends SequenceElement>

    protected class SequenceVectors.AsyncSequencer
    extends Thread
    implements Runnable
    This class is used to fetch data from iterator in background thread, and convert it to List It becomes very usefull if text processing pipeline behind iterator is complex, and we're not loading data from simple text file with whitespaces as separator. Since this method allows you to hide preprocessing latency in background. This mechanics will be change to PrefetchingSentenceIterator wrapper.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • hasMoreLines

        public boolean hasMoreLines()
      • nextSentence

        public Sequence<T> nextSentence()