TEIConst.java 1.23 KB
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ipipan.clarin.tei.impl.utils;

import ipipan.clarin.tei.api.entities.AnnotationLayer;

import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;

/**
 * 
 * @author mlenart
 */
public class TEIConst {
	public final static Map<String, AnnotationLayer> title2Layer;
	public final static Map<AnnotationLayer, String> layer2Title;

	static {
		title2Layer = new HashMap<String, AnnotationLayer>();
		title2Layer.put("Text structure", AnnotationLayer.TEXT);
		title2Layer.put("Segmentation", AnnotationLayer.SEGMENTATION);
		title2Layer.put("Morphosyntax", AnnotationLayer.MORPHOSYNTAX);
		title2Layer.put("Shallow parsing - words", AnnotationLayer.WORDS);
		title2Layer.put("Shallow parsing - groups", AnnotationLayer.GROUPS);
		title2Layer.put("Named entity recognition", AnnotationLayer.NAMES);
		title2Layer.put("Mentions", AnnotationLayer.MENTIONS);
		title2Layer.put("Coreference", AnnotationLayer.COREFERENCE);

		layer2Title = new EnumMap<AnnotationLayer, String>(
				AnnotationLayer.class);
		for (Map.Entry<String, AnnotationLayer> entry : title2Layer.entrySet()) {
			layer2Title.put(entry.getValue(), entry.getKey());
		}
	}
}