1   package eu.fbk.dh.tint.digimorph.annotator;
2   
3   import edu.stanford.nlp.ling.CoreAnnotation;
4   import edu.stanford.nlp.util.ErasureUtils;
5   import eu.fbk.utils.gson.JSONLabel;
6   
7   import java.util.List;
8   
9   /**
10   * Created by giovannimoretti on 19/05/16.
11   */
12  public class DigiMorphAnnotations {
13  
14      @JSONLabel("full_morpho")
15      public static class MorphoAnnotation implements CoreAnnotation<String> {
16  
17          public Class<String> getType() {
18              return String.class;
19          }
20      }
21  
22      @JSONLabel("selected_morpho")
23      public static class SelectedMorphoAnnotation implements CoreAnnotation<String> {
24  
25          public Class<String> getType() {
26              return String.class;
27          }
28      }
29  
30      @JSONLabel("comp_morpho")
31      public static class MorphoCompAnnotation implements CoreAnnotation<List<String>> {
32  
33          public Class<List<String>> getType() {
34              return ErasureUtils.uncheckedCast(List.class);
35          }
36      }
37  
38      @JSONLabel("guessed_lemma")
39      public static class GuessedLemmaAnnotation implements CoreAnnotation<Boolean> {
40  
41          public Class<Boolean> getType() {
42              return ErasureUtils.uncheckedCast(Boolean.class);
43          }
44      }
45  
46  }