code: public void processDocument(BufferedReader document, Wordsi wordsi) {
          String line;
          
          try {
              line = document.readLine();
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
  
          // Split the header from the rest of the context.  The header must be
          // the focus word for this context.
          String[] headerRest = line.split("\\s+", 2);
          
          // Reject any words not accepted by wordsi.
          if (!wordsi.acceptWord(headerRest[0]))
              return;
  
          SparseDoubleVector context = new CompactSparseVector();
  
          // Iterate through each feature and convert it to a dimension for the
          // context vector.
          for (String item : headerRest[1].split("\\|")) {
              String[] featureScore = item.split(",", 2);
              double score = Double.parseDouble(featureScore[0]);
              int dimension = basis.getDimension(featureScore[1]);
              if (dimension >= 0)
                  context.set(dimension, score);
          }
          wordsi.handleContextVector(headerRest[0], headerRest[0], context);
      }
docs: {@inheritDoc}