Skip to content

yfpeng/pengyifan-pubtator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java implementation of Pubtator

Data structures and code to read/write Pubtator file format.

Pubtator

Pubtator format can be used to share text documents and annotations.

Getting started

<repositories>
    <repository>
        <id>oss-sonatype</id>
        <name>oss-sonatype</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
...
<dependency>
  <groupId>com.pengyifan.pubtator</groupId>
  <artifactId>pengyifan-pubtator</artifactId>
  <version>0.0.3-SNAPSHOT</version>
</dependency>

Convert from Pubtator to BioC

import com.pengyifan.pubtator.io.PubTatorIO;
import com.pengyifan.pubtator.PubTatorDocument;
import java.io.PrintWriter;
import java.io.FileReader;
import java.io.Writer;
import java.util.List;

// read from pubtator
List<PubTatorDocument> documents = new ArrayList();
documents.addAll(PubTatorIO.readPubTatorFormat(new FileReader(file)));

// write to bioc
PubTatorIO.write(new FileWriter(outfile), documents);

Developers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published