Package corpora
Class DataLoader
- java.lang.Object
-
- corpora.DataLoader
-
public class DataLoader extends Object
- Author:
- Chinh
-
-
Constructor Summary
Constructors Constructor Description DataLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidloadData(String path, boolean train)static voidmain(String[] args)voidTxt2Db(String path, String dest, boolean train)DBUtilsTxt2Db(String pid, String text, List<String> proteins)Creates a database for event extraction as an programmatic API-call where all values are given directly rather then reading the values from files.
-
-
-
Method Detail
-
loadData
public void loadData(String path, boolean train)
-
Txt2Db
public DBUtils Txt2Db(String pid, String text, List<String> proteins)
Creates a database for event extraction as an programmatic API-call where all values are given directly rather then reading the values from files. In contrast toTxt2Db(String, String, boolean), created in-memory database is returned for further processing and not persisted to file.
The protein lines have to match the Shared Task 2011 format:
ID<tab>Entity-Type[Protein]<tab>start<tab>end<tab>Mention name
Example: T3 Protein 166 174 TGF-beta- Parameters:
pid-text-proteins-- Returns:
-
main
public static void main(String[] args)
-
-