code: public String[] getContext(int i, Object[] toks, String[] preds, Map prevTags) {
      String po=NameFinderME.OTHER;
      String ppo=NameFinderME.OTHER;
      if (i > 1){
        ppo = preds[i-2];
      }
      if (i > 0) {
        po = preds[i-1];
      }
      String cacheKey = i+po+ppo;
      if (contextsCache != null) {
        if (wordsKey == toks){
          String[] cachedContexts = (String[]) contextsCache.get(cacheKey);    
          if (cachedContexts != null) {
            return cachedContexts;
          }
        }
        else {
          contextsCache.clear();
          wordsKey = toks;
        }
      }
      List features;
      if (wordsKey == toks && i == pi) {
        features =prevStaticFeatures; 
      }
      else {
        features = getStaticFeatures(toks,i,prevTags);
        pi=i;
        prevStaticFeatures=features;
      }
      
      int fn = features.size();
      String[] contexts = new String[fn+4];
      for (int fi=0;fi<fn;fi++) {
        contexts[fi]=(String) features.get(fi);
      }
      contexts[fn]="po="+po;
      contexts[fn+1]="pow="+po+toks[i];
      contexts[fn+2]="powf="+po+wordFeature(toks[i].toString());
      contexts[fn+3]="ppo="+ppo;
      if (contextsCache != null) {
        contextsCache.put(cacheKey,contexts);
      }
      return contexts;
    }
docs: Return the context for finding names at the specified index.
  @param i The index of the token in the specified toks array for which the context should be constructed.
  @param toks The tokens of the sentence.  The <code>toString</code> methods of these objects should return the token text.
  @param preds The previous decisions made in the taging of this sequence.  Only indices less than i will be examined.
  @param prevTags  A mapping between tokens and the previous outcome for these tokens.
  @return the context for finding names at the specified index.