Permalink
Browse files

Update to GROBID 0.5.0

  • Loading branch information...
kermitt2 committed Nov 8, 2017
1 parent 159370e commit 0825bd3872bc7b19747789791c72476c84ba5b76
View
@@ -29,3 +29,4 @@ data/corpus/corpus-long/aida/RawText
data/corpus/corpus-long/aida-train/RawText
data/corpus/corpus-long/aida-testa/RawText
data/corpus/corpus-long/aida-testb/RawText
data/species/*
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -14,8 +14,8 @@
import org.grobid.core.factory.*;
import org.grobid.core.main.*;
import org.grobid.core.utilities.GrobidProperties;
import org.grobid.core.mock.*;
//import org.grobid.core.main.GrobidHomeFinder;
//import org.grobid.core.mock.*;
import org.grobid.core.main.GrobidHomeFinder;
import org.grobid.core.layout.LayoutToken;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -274,7 +274,7 @@ public static String dateToString(Date pDate, String pFormat){
return dateFormat.format(pDate);
}
public static void initGrobid() {
/*public static void initGrobid() {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
try {
@@ -295,21 +295,17 @@ public static void initGrobid() {
catch(Exception e) {
throw new NerdException("Fail to initalise the grobid-ner component.", e);
}
}
}*/
/*
// uncomment when grobid dropwizard-service branch becomes master
public static void initGrobidFuture() {
public static void initGrobid() {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
NerdConfig conf = mapper.readValue(new File("data/config/mention.yaml"), NerdConfig.class);
String pGrobidHome = conf.getGrobidHome();
String pGrobidProperties = pGrobidHome + "/config/grobid.properties";
GrobidHomeFinder grobidHomeFinder = new GrobidHomeFinder(Arrays.asList(pGrobidHome));
GrobidProperties.getInstance(grobidHomeFinder);
try {
NerdConfig conf = mapper.readValue(new File("data/config/mention.yaml"), NerdConfig.class);
String pGrobidHome = conf.getGrobidHome();
String pGrobidProperties = pGrobidHome + "/config/grobid.properties";
GrobidHomeFinder grobidHomeFinder = new GrobidHomeFinder(Arrays.asList(pGrobidHome));
GrobidProperties.getInstance(grobidHomeFinder);
@@ -318,7 +314,7 @@ public static void initGrobidFuture() {
catch(Exception e) {
throw new NerdException("Fail to initalise the grobid-ner component.", e);
}
}*/
}
// standard JDK serialization
public static byte[] serialize(Object obj) throws IOException {

0 comments on commit 0825bd3

Please sign in to comment.