code: public void processDocument(BufferedReader document, Wordsi wordsi) {
          try {
              // Handle the context header, if one exists.  Context headers are
              // assumed to be the first line in a document.
              String contextHeader = handleContextHeader(document);
  
              // Iterate over all of the parseable dependency parsed sentences in
              // the document.
              DependencyTreeNode[] nodes = extractor.readNextTree(document);
  
              // Skip empty documents.
              if (nodes.length == 0)
                  return;
  
              // Examine the paths for each word in the sentence.
              for (int wordIndex = 0; wordIndex < nodes.length; ++wordIndex) {
                  DependencyTreeNode focusNode = nodes[wordIndex];
  
                  // Get the focus word, i.e., the primary key, and the
                  // secondary key.  These steps are made as protected methods
                  // so that the SenseEvalDependencyContextExtractor
                  // PseudoWordDependencyContextExtractor can manage only the
                  // keys, instead of the document traversal.
                  String focusWord = getPrimaryKey(focusNode);
                  String secondarykey = getSecondaryKey(focusNode, contextHeader);
  
                  // Ignore any focus words that are unaccepted by Wordsi.
                  if (!acceptWord(focusNode, contextHeader, wordsi))
                      continue;
  
                  // Create a new context vector.
                  SparseDoubleVector focusMeaning = generator.generateContext(
                          nodes, wordIndex);
                  wordsi.handleContextVector(
                          focusWord, secondarykey, focusMeaning);
              }
              document.close();
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
      }
docs: {@inheritDoc}