code: public void processDocument(BufferedReader document, Wordsi wordsi) {
          try {
              // Split the line into the focus word and each feature value.
              // Feature are recorded with the feature index and the feature
              // value, all separated by spaces.
              String termAndVector;
              if ((termAndVector = document.readLine()) == null)
                  return;
              String[] tokens = termAndVector.split("\\s+");
              String[] termSplit = tokens[0].split("\\.");
  
              // Reject topic signatures that are too short.
              if (tokens.length < 10)
                  return;
  
              // Compute the vector length and create the context vector.
              vectorLength = (tokens.length - 1) / 2;
              SparseDoubleVector vector = new CompactSparseVector(
                    (tokens.length - 1) / 2);
  
              // Read each feature index and value.
              for (int i = 1; i < tokens.length; i+=2) {
                  int index = Integer.parseInt(tokens[i]);
                  double value = Double.parseDouble(tokens[i+1]);
                  vector.set(index, value);
              }
  
              wordsi.handleContextVector(termSplit[0], tokens[0], vector);
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
      }
docs: {@inheritDoc}