private void createPOSLayer(Project aProject, TagSet aPosTagset) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationLayer posLayer = new AnnotationLayer(POS.class.getName(), "POS", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); AnnotationFeature tokenPosFeature = new AnnotationFeature(aProject, tokenLayer, "pos", "pos", POS.class.getName()); annotationSchemaService.createFeature(tokenPosFeature); posLayer.setAttachType(tokenLayer); posLayer.setAttachFeature(tokenPosFeature); annotationSchemaService.createLayer(posLayer); annotationSchemaService.createFeature(new AnnotationFeature(aProject, posLayer, "PosValue", "PosValue", CAS.TYPE_NAME_STRING, "Part-of-speech tag", aPosTagset)); }
private void createPOSLayer(Project aProject, TagSet aPosTagset) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationLayer posLayer = new AnnotationLayer(POS.class.getName(), "POS", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); AnnotationFeature tokenPosFeature = new AnnotationFeature(aProject, tokenLayer, "pos", "pos", POS.class.getName()); annotationSchemaService.createFeature(tokenPosFeature); posLayer.setAttachType(tokenLayer); posLayer.setAttachFeature(tokenPosFeature); annotationSchemaService.createLayer(posLayer); annotationSchemaService.createFeature(new AnnotationFeature(aProject, posLayer, "PosValue", "PosValue", CAS.TYPE_NAME_STRING, "Part-of-speech tag", aPosTagset)); }
@Override public void configure(Project aProject) throws IOException { TagSet posTagSet = JsonImportUtil.importTagSetFromJson(aProject, new ClassPathResource("/tagsets/mul-pos-ud.json").getInputStream(), annotationSchemaService); AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationLayer posLayer = new AnnotationLayer(POS.class.getName(), "POS", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); AnnotationFeature tokenPosFeature = new AnnotationFeature(aProject, tokenLayer, "pos", "pos", POS.class.getName()); annotationSchemaService.createFeature(tokenPosFeature); posLayer.setAttachType(tokenLayer); posLayer.setAttachFeature(tokenPosFeature); annotationSchemaService.createLayer(posLayer); annotationSchemaService.createFeature(new AnnotationFeature(aProject, posLayer, "PosValue", "PosValue", CAS.TYPE_NAME_STRING, "Part-of-speech tag", posTagSet)); } }
@Override public void configure(Project aProject) throws IOException { TagSet posTagSet = JsonImportUtil.importTagSetFromJson(aProject, new ClassPathResource("/tagsets/mul-pos-ud.json").getInputStream(), annotationSchemaService); AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationLayer posLayer = new AnnotationLayer(POS.class.getName(), "POS", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); AnnotationFeature tokenPosFeature = new AnnotationFeature(aProject, tokenLayer, "pos", "pos", POS.class.getName()); annotationSchemaService.createFeature(tokenPosFeature); posLayer.setAttachType(tokenLayer); posLayer.setAttachFeature(tokenPosFeature); annotationSchemaService.createLayer(posLayer); annotationSchemaService.createFeature(new AnnotationFeature(aProject, posLayer, "PosValue", "PosValue", CAS.TYPE_NAME_STRING, "Part-of-speech tag", posTagSet)); } }
ExportedAnnotationLayer exLayer = exLayersMap.get(layer.getName()); if (exLayer.getAttachType() != null) { layer.setAttachType(layersMap.get(exLayer.getAttachType().getName()));
ExportedAnnotationLayer exLayer = exLayersMap.get(layer.getName()); if (exLayer.getAttachType() != null) { layer.setAttachType(layersMap.get(exLayer.getAttachType().getName()));
depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenPosFeature);
depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenPosFeature);
depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenPosFeature);
depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenPosFeature);
private void createLemmaLayer(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenLemmaFeature = new AnnotationFeature(aProject, tokenLayer, "lemma", "lemma", Lemma.class.getName()); annotationSchemaService.createFeature(tokenLemmaFeature); AnnotationLayer lemmaLayer = new AnnotationLayer(Lemma.class.getName(), "Lemma", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); lemmaLayer.setAttachType(tokenLayer); lemmaLayer.setAttachFeature(tokenLemmaFeature); annotationSchemaService.createLayer(lemmaLayer); AnnotationFeature lemmaFeature = new AnnotationFeature(); lemmaFeature.setDescription("lemma Annotation"); lemmaFeature.setName("value"); lemmaFeature.setType(CAS.TYPE_NAME_STRING); lemmaFeature.setProject(aProject); lemmaFeature.setUiName("Lemma"); lemmaFeature.setLayer(lemmaLayer); annotationSchemaService.createFeature(lemmaFeature); }
private void createLemmaLayer(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenLemmaFeature = new AnnotationFeature(aProject, tokenLayer, "lemma", "lemma", Lemma.class.getName()); annotationSchemaService.createFeature(tokenLemmaFeature); AnnotationLayer lemmaLayer = new AnnotationLayer(Lemma.class.getName(), "Lemma", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); lemmaLayer.setAttachType(tokenLayer); lemmaLayer.setAttachFeature(tokenLemmaFeature); annotationSchemaService.createLayer(lemmaLayer); AnnotationFeature lemmaFeature = new AnnotationFeature(); lemmaFeature.setDescription("lemma Annotation"); lemmaFeature.setName("value"); lemmaFeature.setType(CAS.TYPE_NAME_STRING); lemmaFeature.setProject(aProject); lemmaFeature.setUiName("Lemma"); lemmaFeature.setLayer(lemmaLayer); annotationSchemaService.createFeature(lemmaFeature); }
@Override public void configure(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenLemmaFeature = new AnnotationFeature(aProject, tokenLayer, "lemma", "lemma", Lemma.class.getName()); annotationSchemaService.createFeature(tokenLemmaFeature); AnnotationLayer lemmaLayer = new AnnotationLayer(Lemma.class.getName(), "Lemma", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); lemmaLayer.setAttachType(tokenLayer); lemmaLayer.setAttachFeature(tokenLemmaFeature); annotationSchemaService.createLayer(lemmaLayer); AnnotationFeature lemmaFeature = new AnnotationFeature(); lemmaFeature.setDescription("lemma Annotation"); lemmaFeature.setName("value"); lemmaFeature.setType(CAS.TYPE_NAME_STRING); lemmaFeature.setProject(aProject); lemmaFeature.setUiName("Lemma"); lemmaFeature.setLayer(lemmaLayer); annotationSchemaService.createFeature(lemmaFeature); } }
@Override public void configure(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenLemmaFeature = new AnnotationFeature(aProject, tokenLayer, "lemma", "lemma", Lemma.class.getName()); annotationSchemaService.createFeature(tokenLemmaFeature); AnnotationLayer lemmaLayer = new AnnotationLayer(Lemma.class.getName(), "Lemma", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); lemmaLayer.setAttachType(tokenLayer); lemmaLayer.setAttachFeature(tokenLemmaFeature); annotationSchemaService.createLayer(lemmaLayer); AnnotationFeature lemmaFeature = new AnnotationFeature(); lemmaFeature.setDescription("lemma Annotation"); lemmaFeature.setName("value"); lemmaFeature.setType(CAS.TYPE_NAME_STRING); lemmaFeature.setProject(aProject); lemmaFeature.setUiName("Lemma"); lemmaFeature.setLayer(lemmaLayer); annotationSchemaService.createFeature(lemmaFeature); } }
@Override public void configure(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenMorphFeature = new AnnotationFeature(aProject, tokenLayer, "morph", "morph", Lemma.class.getName()); annotationSchemaService.createFeature(tokenMorphFeature); AnnotationLayer morphLayer = new AnnotationLayer(MorphologicalFeatures.class.getName(), "Morphological features", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); morphLayer.setAttachType(tokenLayer); morphLayer.setAttachFeature(tokenMorphFeature); annotationSchemaService.createLayer(morphLayer); AnnotationFeature valueFeature = new AnnotationFeature(); valueFeature.setDescription("Morphological features"); valueFeature.setName("value"); valueFeature.setType(CAS.TYPE_NAME_STRING); valueFeature.setProject(aProject); valueFeature.setUiName("Features"); valueFeature.setLayer(morphLayer); valueFeature.setIncludeInHover(true); valueFeature.setVisible(false); annotationSchemaService.createFeature(valueFeature); } }
@Override public void configure(Project aProject) throws IOException { AnnotationLayer tokenLayer = annotationSchemaService.getLayer(Token.class.getName(), aProject); AnnotationFeature tokenMorphFeature = new AnnotationFeature(aProject, tokenLayer, "morph", "morph", Lemma.class.getName()); annotationSchemaService.createFeature(tokenMorphFeature); AnnotationLayer morphLayer = new AnnotationLayer(MorphologicalFeatures.class.getName(), "Morphological features", SPAN_TYPE, aProject, true, AnchoringMode.SINGLE_TOKEN); morphLayer.setAttachType(tokenLayer); morphLayer.setAttachFeature(tokenMorphFeature); annotationSchemaService.createLayer(morphLayer); AnnotationFeature valueFeature = new AnnotationFeature(); valueFeature.setDescription("Morphological features"); valueFeature.setName("value"); valueFeature.setType(CAS.TYPE_NAME_STRING); valueFeature.setProject(aProject); valueFeature.setUiName("Features"); valueFeature.setLayer(morphLayer); valueFeature.setIncludeInHover(true); valueFeature.setVisible(false); annotationSchemaService.createFeature(valueFeature); } }
project, true, SINGLE_TOKEN); depLayer.setId(3l); depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenLayerPos); dependencyLayerGovernor = new AnnotationFeature(2l, depLayer, "Governor",
project, true, SINGLE_TOKEN); depLayer.setId(3l); depLayer.setAttachType(tokenLayer); depLayer.setAttachFeature(tokenLayerPos); dependencyLayerGovernor = new AnnotationFeature(2l, depLayer, "Governor",
ProjectUtil.setLayer(annotationService, layer, aExLayer, project, aUser); layer.setAttachType(aAttachLayer); for (de.tudarmstadt.ukp.clarin.webanno.model.export.AnnotationFeature exfeature : aExLayer .getFeatures()) {