Data structures and code to read/write Pubtator file format.
Pubtator format can be used to share text documents and annotations.
<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>
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);
- Yifan Peng (yfpeng@udel.edu)