@Override
public boolean incrementToken() throws IOException {
	buffer.setLength(0);
    int ci;
    char ch, pch;
    boolean atBegin = true;
    tokenStart = tokenEnd;
    ci = bufferInput.read();
    ch = (char) ci;

    while (true) {
      if (ci == -1) {
        break;
      } else if (PUNCTION.indexOf(ch) != -1) {
        // 找到了句子末尾
        buffer.append(ch);
        tokenEnd++;
        break;
      } else if (atBegin && Utility.SPACES.indexOf(ch) != -1) {
        tokenStart++;
        tokenEnd++;
        ci = bufferInput.read();
        ch = (char) ci;
      } else {
        buffer.append(ch);
        atBegin = false;
        tokenEnd++;
        pch = ch;
        ci = bufferInput.read();
        ch = (char) ci;
        // 如果碰上了两个连续的skip字符，例如两个回车，两个空格或者，
        // 一个回车，一个空格等等，将其视为句子结束，以免句子太长而内存不足
        if (Utility.SPACES.indexOf(ch) != -1
            && Utility.SPACES.indexOf(pch) != -1) {
          // buffer.append(ch);
          tokenEnd++;
          break;
        }
      }
    }
    if (buffer.length() == 0)
      return false;
    else {
      clearAttributes();
      termAttr.setEmpty().append(buffer);
      termAttr.setLength(buffer.length());
      offsetAttr.setOffset(correctOffset(tokenStart), correctOffset(tokenEnd));
      return true;
    }
}