Tabnine Logo
de.tudarmstadt.ukp.clarin.webanno.tsv
Code IndexAdd Tabnine to your IDE (free)

How to use de.tudarmstadt.ukp.clarin.webanno.tsv

Best Java code snippets using de.tudarmstadt.ukp.clarin.webanno.tsv (Showing top 20 results out of 315)

origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

private AnnotationUnit getFirstUnit(AnnotationUnit aUnit)
{
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(aUnit.begin);
  sta.setEnd(aUnit.end);
  sta.setText(aUnit.token);
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
origin: webanno/webanno

private static AnnotationFS makeLinkHostFS(JCas aJCas, int aBegin, int aEnd,
    FeatureStructure... aLinks)
{
  return makeLinkHostFS(aJCas, "webanno.custom.SimpleLinkHost", aBegin, aEnd, aLinks);
}

origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

  @Override
  public void getNext(JCas aJCas) throws IOException, CollectionException {
    Resource res = nextFile();
    initCas(aJCas, res);
    InputStream is = null;
    try {
      is = res.getInputStream();
      convertToCas(aJCas, is, encoding);
    } finally {
      closeQuietly(is);
    }

  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

@Override
public void getNext(JCas aJCas)
  throws IOException, CollectionException
{
  Resource res = nextFile();
  initCas(aJCas, res);
  InputStream is = null;
  try {
    is = res.getInputStream();
    convertToCas(aJCas, is, encoding);
  }
  finally {
    closeQuietly(is);
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

  @Override
  public void getNext(JCas aJCas) throws IOException, CollectionException {
    Resource res = nextFile();
    initCas(aJCas, res);
    InputStream is = null;
    try {
      is = res.getInputStream();
      convertToCas(aJCas, is, encoding);
    } finally {
      closeQuietly(is);
    }

  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

@Override
public void process(JCas aJCas)
  throws AnalysisEngineProcessException
{
  OutputStream docOS = null;
  try {
    docOS = getOutputStream(aJCas, filenameSuffix);
    convertToTsv(aJCas, docOS, encoding);
  }
  catch (Exception e) {
    throw new AnalysisEngineProcessException(e);
  }
  finally {
    closeQuietly(docOS);
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.tsv

@Override
public void getNext(JCas aJCas)
  throws IOException, CollectionException
{
  Resource res = nextFile();
  initCas(aJCas, res);
  InputStream is = null;
  try {
    is = res.getInputStream();
    convertToCas(aJCas, is, encoding);
  }
  finally {
    closeQuietly(is);
  }
}
origin: webanno/webanno

@Test
public void testSubMultiTokenSpanWithoutFeatureValue() throws Exception
{
  JCas jcas = makeJCasOneSentence();
  
  Span ne1 = new Span(jcas, 0, 6);
  ne1.addToIndexes();
  
  writeAndAssertEquals(jcas, 
      WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(Span.class));
}
origin: webanno/webanno

private static FeatureStructure makeLinkFS(JCas aJCas, String aSlotLabel, AnnotationFS aTarget)
{
  return makeLinkFS(aJCas, "webanno.custom.LinkType", aSlotLabel, aTarget);
}
origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.tsv

public void convertToCas(JCas aJCas, InputStream aIs, String aEncoding)
  throws IOException
{
  StringBuilder text = new StringBuilder();
  DocumentMetaData documentMetadata = DocumentMetaData.get(aJCas);
  fileName = documentMetadata.getDocumentTitle();
  setAnnotations(aJCas, aIs, aEncoding, text);
  aJCas.setDocumentText(text.toString());
}
origin: webanno/webanno

private static JCas makeJCasOneSentence() throws UIMAException
{
  JCas jcas = makeJCas();
  
  TokenBuilder<Token, Sentence> tb = new TokenBuilder<>(Token.class,
      Sentence.class);
  tb.buildTokens(jcas, "This is a test .");
  
  return jcas;
}

origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

private AnnotationUnit getFirstUnit(AnnotationUnit aUnit)
{
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(aUnit.begin);
  sta.setEnd(aUnit.end);
  sta.setText(aUnit.token);
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

@Override
public void getNext(JCas aJCas)
  throws IOException, CollectionException
{
  Resource res = nextFile();
  initCas(aJCas, res);
  InputStream is = null;
  try {
    is = res.getInputStream();
    convertToCas(aJCas, is, encoding);
  }
  finally {
    closeQuietly(is);
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

  @Override
  public void getNext(JCas aJCas)
    throws IOException, CollectionException
  {
    Resource res = nextFile();
    initCas(aJCas, res);
    InputStream is = null;
    try {
      is = res.getInputStream();
      convertToCas(aJCas, is, encoding);
    }
    finally {
      closeQuietly(is);
    }

  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

@Override
public void process(JCas aJCas)
  throws AnalysisEngineProcessException
{
  OutputStream docOS = null;
  try {
    docOS = getOutputStream(aJCas, filenameSuffix);
    convertToTsv(aJCas, docOS, encoding);
  }
  catch (Exception e) {
    throw new AnalysisEngineProcessException(e);
  }
  finally {
    closeQuietly(docOS);
  }
}
origin: webanno/webanno

private AnnotationUnit getFirstUnit(AnnotationUnit aUnit)
{
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(aUnit.begin);
  sta.setEnd(aUnit.end);
  sta.setText(aUnit.token);
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
origin: webanno/webanno

@Override
public void getNext(JCas aJCas)
  throws IOException, CollectionException
{
  Resource res = nextFile();
  initCas(aJCas, res);
  InputStream is = null;
  try {
    is = res.getInputStream();
    convertToCas(aJCas, is, encoding);
  }
  finally {
    closeQuietly(is);
  }
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

private AnnotationUnit getFirstUnit(AnnotationFS targetFs) {
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(targetFs.getBegin());
  sta.setEnd(targetFs.getEnd());
  sta.setText(targetFs.getCoveredText());
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

private AnnotationUnit getFirstUnit(AnnotationFS targetFs)
{
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(targetFs.getBegin());
  sta.setEnd(targetFs.getEnd());
  sta.setText(targetFs.getCoveredText());
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
origin: webanno/webanno

private AnnotationUnit getFirstUnit(AnnotationFS targetFs)
{
  SubTokenAnno sta = new SubTokenAnno();
  sta.setBegin(targetFs.getBegin());
  sta.setEnd(targetFs.getEnd());
  sta.setText(targetFs.getCoveredText());
  Set<AnnotationUnit> sus = new LinkedHashSet<>();
  AnnotationUnit firstUnit = null;
  for (AnnotationUnit u : getSubUnits(sta, sus)) {
    firstUnit = u;
    break;
  }
  return firstUnit;
}
de.tudarmstadt.ukp.clarin.webanno.tsv

Most used classes

  • WebAnnoTsv3FormatSupport
  • WebannoTsv3Writer
    Export annotations in TAB separated format. Header includes information about the UIMA type and feat
  • WebannoTsv1Reader
    Reads a specific TSV File (9 TAB separated) annotation and change it to CAS object. Example of Input
  • WebannoTsv2Reader
    This class reads a WebAnno compatible TSV files and create annotations from the information provided
  • WebannoTsv2Writer
    Export annotations in TAB separated format. Header includes information about the UIMA type and feat
  • WebannoTsv3Writer$SubTokenAnno,
  • Tsv3XCasDocumentBuilder,
  • Tsv3XCasSchemaAnalyzer,
  • TsvColumn,
  • TsvDocument,
  • TsvSchema,
  • TsvSentence,
  • TsvToken,
  • AnnotationUnit,
  • WebAnnoTsv3LegacyFormatSupport,
  • WebAnnoTsv3ReaderWriterRoundTripTest,
  • WebAnnoTsv3WriterTestBase,
  • WebannoCustomTsvReader,
  • WebannoCustomTsvWriter
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now