Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ To extract metadata from an affiliation string use:

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

(OPTIONAL) if you would like to build an executable JAR yourself, clone the project and execute:

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

This will result in a file `cermine-impl-<VERSION>-jar-with-dependencies.jar` in `cermine-impl/target` directory.


**Maven dependency**

CERMINE can be used in Java projects by adding the following dependency and repository to the project's `pom.xml` file:
Expand Down Expand Up @@ -131,3 +123,30 @@ To extract metadata from an affiliation string:
$ curl -X POST --data "affiliation=the text of the affiliation" \
http://cermine.ceon.pl/parse.do


(OPTIONAL) Build & Run from sources
-------------

If you would like to build an executable JAR yourself, clone the project and follow these steps.

**Preconditions**

- Ensure that Apache Maven is installed (`sudo apt install maven`)

**Build **

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this additional space, it seems to break the layout: https://github.com/philonor/CERMINE/blob/5c2790f9fd1dc3a087fef698c97bb2663a9a0974/README.md


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

Afterwards a new `target` directory is placed within `CERMINE/cermine-impl/` containing a `cermine-impl-<VERSION>-jar-with-dependencies.jar` file. Ensure the file is readable by `java`.
```
$ chmod u+x target/cermine-impl-<VERSION>-jar-with-dependencies.jar

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need the JAR file to have execute permission. See for example https://stackoverflow.com/questions/2668796/what-are-the-minimum-unix-permissions-to-run-an-executable-jar-file

```

**Run**

```
$ java -cp target/cermine-impl-1.14-SNAPSHOT-jar-with-dependencies.jar pl.edu.icm.cermine.ContentExtractor -path /path/to/pdfs
```