Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #79 from SeerLabs/CiteSeerX_grobid_handling
Browse files Browse the repository at this point in the history
Cite seer x grobid handling
  • Loading branch information
fanchyna committed Nov 25, 2019
2 parents 2611627 + 327798e commit 49ecb50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Expand Up @@ -90,11 +90,14 @@ public static edu.psu.citeseerx.domain.Document map(Element root)
FileInfoMapper.map(doc, child);
}
if (child.getName().equals("algorithm")) {
if (child.getAttributeValue("name").equals("SVM HeaderParse")) {
if (child.getAttributeValue("name").equals("SVM HeaderParse") || child.getAttributeValue("name").contains("GROBID")) {
ParsHedMapper.map(doc, child);
}
if (child.getAttributeValue("name").equals("ParsCit")) {
} else if (child.getAttributeValue("name").equals("ParsCit")) {
ParscitMapper.map(doc, child);
}else {
System.err.println("WARNING : Algorithm name attribute is not what " +
"was expected: found "+child.getName()+
", expected SVM HeaderParse, ParsCit or GROBID");
}
}
}
Expand Down
Expand Up @@ -79,10 +79,10 @@ public static Document map(String xml)
public static void map(Document doc, Element root)
throws MappingException {

if (!root.getAttributeValue("name").equals(ALG_NAME)) {
if (!root.getAttributeValue("name").equals(ALG_NAME) && !root.getAttributeValue("name").contains("GROBID")) {
throw new MappingException("Root name attribute is not what " +
"was expected: found "+root.getAttributeValue("name")+
", expected "+ALG_NAME);
", expected "+ALG_NAME + " or GROBID");
}
buildDoc(doc, root);

Expand Down

0 comments on commit 49ecb50

Please sign in to comment.