@Override
    public int next() {

        String word = null;
        try {
            word = readWord();
        } catch (IOException ignored) {}

        if (word == null) return -1;
        else return vocab.index(word);
    }