TEIConst.java
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* 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());
}
}
}