code: public SparseDoubleVector generateContext(DependencyTreeNode[] tree,
                                                int focusIndex) {
          DependencyTreeNode focusNode = tree[focusIndex];
  
          SparseDoubleVector meaning = new CompactSparseVector(indexVectorLength);
  
          Iterator<DependencyPath> paths = new FilteredDependencyIterator(
                  focusNode, acceptor, pathLength);
  
          while (paths.hasNext()) {
              DependencyPath path = paths.next();
              if (readOnly && !indexMap.containsKey(path.last().word()))
                  continue;
  
              TernaryVector termVector = indexMap.get(path.last().word());
              if (permFunc != null)
                  termVector = permFunc.permute(termVector, path);
              add(meaning, termVector);
          }
          return meaning;
      }
docs: {@inheritDoc}