code: public SparseDoubleVector generateContext(DependencyTreeNode[] tree,
                                                int focusIndex) {
          Queue<String> prevWords = new ArrayDeque<String>();
          for (int i = Math.max(0, focusIndex-windowSize-1); i < focusIndex; ++i)
              prevWords.add(getFeature(tree[i], i-focusIndex));
                  
          Queue<String> nextWords = new ArrayDeque<String>();
          for (int i = focusIndex+1;
                   i < Math.min(focusIndex+windowSize+1, tree.length); ++i)
              nextWords.add(getFeature(tree[i], i-focusIndex));
  
          SparseDoubleVector focusMeaning = new CompactSparseVector();
          addContextTerms(focusMeaning, prevWords, -1 * prevWords.size());
          addContextTerms(focusMeaning, nextWords, 1);
          return focusMeaning;
      }
docs: {@inheritDoc}