GithubHelp home page GithubHelp logo

luzc08 / cermine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ceon/cermine

0.0 2.0 0.0 168.53 MB

Content ExtRactor and MINEr

License: GNU Affero General Public License v3.0

Java 57.32% PigLatin 0.02% Shell 0.01% Protocol Buffer 0.01% Python 0.48% CSS 0.98% HTML 40.15% PHP 0.67% JavaScript 0.36%

cermine's Introduction

Content ExtRactor and MINEr

Join the chat at https://gitter.im/CeON/CERMINE

CERMINE is a Java library and a web service (cermine.ceon.pl) for extracting metadata and content from PDF files containing academic publications. CERMINE is written in Java at Centre for Open Science at Interdisciplinary Centre for Mathematical and Computational Modelling, University of Warsaw.

The code is licensed under GNU Affero General Public License version 3.

How to cite CERMINE:

Dominika Tkaczyk, Pawel Szostek, Mateusz Fedoryszak, Piotr Jan Dendek and Lukasz Bolikowski. 
CERMINE: automatic extraction of structured metadata from scientific literature. 
In International Journal on Document Analysis and Recognition (IJDAR), 2015, 
vol. 18, no. 4, pp. 317-335, doi: 10.1007/s10032-015-0249-8.

DOI of CERMINE release 1.8:

DOI

Using CERMINE

CERMINE can be used for:

  • extracting metadata, full text and parsed references from a PDF file,
  • extracting metadata from reference strings,
  • extracting metadata from affiliation strings.

In all tasks the default output format is NLM JATS.

Maven dependency

CERMINE can be used in Java projects by adding the following dependency and repository to the project's pom.xml file:

<dependency>
	<groupId>pl.edu.icm.cermine</groupId>
	<artifactId>cermine-impl</artifactId>
	<version>${cermine.version}</version>
</dependency>

<repository>
	<id>icm</id>
	<name>ICM repository</name>
	<url>http://maven.icm.edu.pl/artifactory/repo</url>
</repository>

To extract the content from a PDF file:

PdfNLMContentExtractor extractor = new PdfNLMContentExtractor();
InputStream inputStream = new FileInputStream("path/to/pdf/file");
Element result = extractor.extractContent(inputStream);

To extract metadata from a reference string:

CRFBibReferenceParser parser = CRFBibReferenceParser.getInstance();
BibEntry reference = parser.parseBibReference(referenceText);

To extract metadata from an affiliation string:

CRFAffiliationParser parser = new CRFAffiliationParser();
Element affiliation = parser.parse(affiliationText);

Executable JAR

Alternatively, Maven can be used to build an executable JAR containing all needed classes and resources:

$ cd CERMINE/cermine-impl
$ mvn compile assembly:single

This will result in a file cermine-impl--jar-with-dependencies.jar in cermine-impl/target directory. Executable JARs can also be downloaded from the repository.

To extract the content from PDF files:

$ java -cp target/cermine-impl-<VERSION>-jar-with-dependencies.jar pl.edu.icm.cermine.PdfNLMContentExtractor -path path/to/directory/with/pdfs/or/a/single/pdf

To extract metadata from a reference string:

$ java -cp target/cermine-impl-<VERSION-jar-with-dependencies.jar pl.edu.icm.cermine.bibref.CRFBibReferenceParser -reference "the text of the reference"

To extract metadata from an affiliation string:

$ java -cp target/cermine-impl-<VERSION>-jar-with-dependencies.jar pl.edu.icm.cermine.metadata.affiliation.CRFAffiliationParser -affiliation "the text of the affiliation"

REST service

The third possibility is to use CERMINE's REST service with cURL tool.

To extract the content from a PDF file:

$ curl -X POST --data-binary @article.pdf \
  --header "Content-Type: application/binary"\
  http://cermine.ceon.pl/extract.do

To extract metadata from a reference string:

$ curl -X POST --data "reference=the text of the reference" \
  http://cermine.ceon.pl/parse.do

To extract metadata from an affiliation string:

$ curl -X POST --data "affiliation=the text of the affiliation" \
  http://cermine.ceon.pl/parse.do

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.