public void calculateRelativeFrequenciesPerRole() {

		featureValueFrequency.put("all", new MultiSet<String>());
		featureValueFrequency.get("all").add("all", totalCount);
		for (String featureType : FeatureTypes.getUsedFeatures()) {
			if (featureType.contains(Const.roleTypeIdentifier)) {
				int roleIndex = 0;
				String role = "";
				int i = 0;
				for (String featureTypePart : featureType.split(Const.splitChar)) {
					if (featureTypePart.equals(Const.roleTypeIdentifier)) {
						roleIndex = i;
						role = featureTypePart;
					}
					i++;
				}

				for (Entry<String, Integer> countsPerRolePerFeatureValue : featureValueFrequency.get(featureType).getMap().entrySet()) {
					String featureValue = countsPerRolePerFeatureValue.getKey();
					String[] featureValueParts = featureValue.split(Const.splitChar);

					if (!featureValueRelativeRoleFrequency.containsKey(featureType)) {
						featureValueRelativeRoleFrequency.put(featureType, new HashMap<String, Double>());
					}
					if (featureValueParts.length == 1) {
						featureValueRelativeRoleFrequency.get(featureType).put(featureValue, Math.log(countsPerRolePerFeatureValue.getValue()) - Math.log(totalCount));
					} else
						featureValueRelativeRoleFrequency.get(featureType).put(featureValue, Math.log(countsPerRolePerFeatureValue.getValue()) - Math.log(featureValueFrequency.get(role).get(featureValueParts[roleIndex])));
				}
			} else {
				// wirklich noetig??
				/*for (Entry<String, Integer> countsPerRolePerFeatureValue : featureValueFrequency.get(featureType).getMap().entrySet()) {
					String featureValue = countsPerRolePerFeatureValue.getKey();
					if (!featureValueRelativeRoleFrequency.containsKey(featureType)) {
						Map<String, Double> valueProbabilities = new HashMap<String, Double>();
						featureValueRelativeRoleFrequency.put(featureType, valueProbabilities);
					}
					featureValueRelativeRoleFrequency.get(featureType).put(featureValue, Math.log(countsPerRolePerFeatureValue.getValue()) - Math.log(totalCount));
				} */
			}
		}
		//System.out.println();
	}