docs: public Iterator<List<HasWord>> iterator() {
      try {
        if (inputReader == null)
          inputReader = getReaderFromPath(inputPath);
  
        //TODO: Add new document types here
        if (docType == DocType.Plain) {
          return new PlainTextIterator();
        } else if (docType == DocType.XML) {
          return new XMLIterator();
        }
  
      } catch (IOException e) {
        System.err.printf("%s: Could not open path %s\n", this.getClass().getName(), inputPath);
      }
  
      return new Iterator<List<HasWord>>() {
        public boolean hasNext() { return false; }
        public List<HasWord> next() { throw new NoSuchElementException(); }
        public void remove() {}
      };
    }