/* (non-Javadoc)
@see jvntextpro.data.ContextGenerator#getContext(jvntextpro.data.Sentence, int)
497475
@Override
	public String[] getContext(Sentence sent, int pos) {
		List<String> cps = new ArrayList<String>();
		
		for (int it = 0; it < cpnames.size(); ++it){			
			String cp = cpnames.get(it);
			Vector<Integer> paras = this.paras.get(it);
			String cpvalue = "";
			
			if (cp.equals("syll_conj_gen")){
				String prefix = "s:";
				String suffix = "";			
				for (int i = 0; i < paras.size(); ++i) {
					if (pos + paras.get(i) < 0 || pos + paras.get(i)>= sent.size()){
						cpvalue = "";
						continue;
					}
		
					prefix += paras.get(i) + ":";
					suffix += sent.getWordAt(pos + paras.get(i)) + ":";
				}			
				
				if (suffix.endsWith(":"))
					cpvalue = prefix + suffix.substring(0, suffix.length() - 1);
			}
			if (!cpvalue.equals("")) cps.add(cpvalue);
		}
		String [] ret = new String[cps.size()];		
		return cps.toArray(ret);
	}
749293
public String getSentence() {
    if(sentence != null)
      return this.sentence;
    else if(doc != null) {
      return span.getCoveredText(doc).toString();
    } else {
      return null;
    }
  }
980319
public String[] getContext(Object o) {
    Object[] data = (Object[]) o;
    List outcomes = ((Sequence) data[2]).getOutcomes();
    return (getContext(((Integer) data[0]).intValue(), (Object[]) data[1], (String[]) data[3], outcomes.toArray(new String[outcomes.size()])));
  }
838269
public String getContext(int wordsLeft, int wordsRight){
		final String text = home_cc.getText();
		int temp;

		// get the left start position
		int posLeft = pos.getStart();
		temp = posLeft-1;
		while( posLeft != 0 && wordsLeft > 0 ){
			while( temp > 0 && text.charAt( temp ) < 48  ) {
				temp--;
			}
			while( temp > 0 && text.charAt( temp ) >= 48 ) {
				temp--;
			}
			posLeft = ( temp>0 ? temp+1 : 0 );
			wordsLeft--;
		}

		// get the right end position
		int posRight = pos.getEnd();
		temp = posRight;
		while( posRight != text.length() && wordsRight > 0 ){
			while( temp < text.length() && text.charAt( temp ) < 48 ) {
				temp++;
			}
			while( temp < text.length() && text.charAt( temp ) >= 48 ) {
				temp++;
			}
			posRight = temp;
			wordsRight--;
		}

		// retrun a string...
		return
			text.substring(posLeft, pos.getStart() ) +
			text.substring(pos.getEnd(), posRight);
	}
704285
public static Context getContext()
    {
        if (ctx == null)
        {
            try
            {
                setContext(null);
            }
            catch (Exception e)
            {
                log.error("Cannot instantiate the InitialContext", e);
                throw new OJBRuntimeException(e);
            }
        }
        return ctx;
    }
1136037
function createContext(sentence) {
  const context = new Array(sentence.length + 4);
        context[0] = START[0];
        context[1] = START[1];

  for (let j = 0, m = sentence.length; j < m; j++)
    context[j + 2] = normalize(sentence[j][0]);

  context[context.length - 2] = END[0];
  context[context.length - 1] = END[1];

  return context;
}
880452
public ThreadDelegatedContext getContext()
    {
        ThreadDelegatedContext context = threadLocal.get();
        if (context == null) {
            context = new ThreadDelegatedContext();
            threadLocal.set(context);
        }
        return context;
    }
1284607
public String[] getContext(Object o) {
	String s = (String)o;
	int prevIndex = -1;
	int index = s.indexOf(' ');
	List cuts = new ArrayList();
	while (index != -1) {
	    cuts.add(s.substring(prevIndex+1, index));
	    prevIndex = index;
	    index = s.indexOf(' ', ++index);
	}
	cuts.add(s.substring(prevIndex+1, s.length()));
	return (String[])cuts.toArray(new String[cuts.size()]);
    }
155711
public String getContextStr(Sentence sent, int wordIdx){
		String cpStr = "";
		
		for (int i = 0; i < cntxGenVector.size(); ++i){
			String [] context = cntxGenVector.get(i).getContext(sent, wordIdx);
			if (context != null){
				for (int j = 0; j < context.length; ++j){
					if (context[j].trim().equals("")) continue;
					cpStr += context[j] + " ";
				}
			}
		}
		
		return cpStr.trim();
	}
1150058
protected ELContext getELContext() {
	FacesContext fc = getFacesContext();
	ELContext result = null;
	if (null != fc) {
	    result = fc.getELContext();
	}
	return result;
    }
914097
public static String getContext(final PObject[] objs) {
        StringBuilder result = new StringBuilder("(");
        boolean first = true;
        for (PObject obj: objs) {
            if (!first) {
                result.append('|');
            }
            first = false;
            result.append(obj.getCurrentPath());
        }
        result.append(')');
        return result.toString();
    }
276228
public synchronized EvaluatorContext getContext(final String contextId) {
    for (final EvaluatorContext context : this.contextStack) {
      if (context.getId().equals(contextId)) {
        return context;
      }
    }
    throw new RuntimeException("Unknown evaluator context " + contextId);
  }
626277
public static Context getApplicationContext() {
        com.ardikars.jxnet.context.Context context = com.ardikars.jxnet.context.Application.getApplicationContext();
        return new ApplicationContext(context);
    }
720609
public static ApplicationContext get() {
        ClassLoader classLoader = getContextClassLoader();
        while (classLoader != null) {
            ApplicationContext applicationContext = contextMap.get(classLoader);
            if (applicationContext != null) {
                return applicationContext;
            }
            classLoader = classLoader.getParent();
        }
        return null;
    }
1331479
public static PageFlowContext getContext() {
        PageFlowContext ctxt = (PageFlowContext) pageflowContext.get();
        if (ctxt == null) {
            ctxt = new PageFlowContext();
            pageflowContext.set(ctxt);
        }
        return ctxt;
    }
891812
@Override
    public void setContext(DisplayContext context) {
        super.setContext(context);
        if (!capitalizationInfoIsSet &&
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU || context==DisplayContext.CAPITALIZATION_FOR_STANDALONE)) {
            initCapitalizationContextInfo(fLocale);
            capitalizationInfoIsSet = true;
        }
        if (capitalizationBrkIter == null && (context==DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationOfRelativeUnitsForListOrMenu) ||
              (context==DisplayContext.CAPITALIZATION_FOR_STANDALONE && capitalizationOfRelativeUnitsForStandAlone) )) {
            capitalizationBrkIter = BreakIterator.getSentenceInstance(fLocale);
        }
    }
354519
@NonNull public Context getContext() {
        if (searchView != null) {
            return searchView.getContext();
        } else if (supportView != null) {
            return supportView.getContext();
        }
        throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
    }