public Vector<TIntObjectHashMap<TIntDoubleHashMap>> getContext(
			ContextDocument doc) {
		Vector<TIntObjectHashMap<TIntDoubleHashMap>> all_cxt = new Vector<TIntObjectHashMap<TIntDoubleHashMap>>();
		TIntObjectHashMap<TIntDoubleHashMap> cxt_w_id = new TIntObjectHashMap<TIntDoubleHashMap>();
		int radius = rad;
		int[] words = doc.wordSequence.getFeatures();
		for (int i = 0; i < doc.sentenseLength; i++) {
			if (doc.contextObject.contains(i)) {
				TIntDoubleHashMap cxt = new TIntDoubleHashMap();
				int begin = i - radius, end = i + radius;
				// generate context vector
				if (i < radius) {
					begin = i;
				}
				if (i + radius >= doc.sentenseLength) {
					end = doc.sentenseLength - 1;
				}
				for (int j = begin; j <= end; j++) {
					for (int k = doc.SentenseBoundaries.get(j).firstElement(); k < doc.SentenseBoundaries
							.get(j).lastElement(); k++) {
						cxt.adjustOrPutValue(words[k], 1, 1);

					}
				}

				double norm = 0;

				int[] keys = cxt.keys();
				for (int j = 0; j < keys.length; j++) {
					norm += Math.pow(cxt.get(keys[j]), 2);
				}
				norm = Math.pow(norm, 0.5);

				for (int j = 0; j < keys.length; j++) {
					cxt.put(keys[j], cxt.get(keys[j]) / norm);
				}
				for (int j = 0; j < doc.contextObject.get(i).size(); j++) {
					cxt_w_id.put(doc.contextObject.get(i).get(j), cxt);// note:
																		// shallow
																		// copies
				}
				all_cxt.add(cxt_w_id);
			}
		}
		return all_cxt;
	}