<commit_before>
!https://travis-ci.org/hbz/lobid-rdf-to-json.png?branch=master!:https://travis-ci.org/hbz/lobid-rdf-to-json

h1. About

Converts lobid Ntriples created in https://github.com/hbz/lobid-resources to nested JSON-LD using etikett generated configuration.

h1. Build

"!https://secure.travis-ci.org/hbz/lobid-resources.png?branch=master!":https://travis-ci.org/hbz/lobid-resources

Prerequisites: Java 8, Maven 3; verify with @mvn -version@

Create and change into a folder where you want to store the projects:

* @git clone https://github.com/hbz/lobid-rdf-to-json.git@
* @cd lobid-resources@
* @mvn clean install -DskipTests@

See the @.travis.yml@ file for details on the CI config used by Travis.

h1. Developer instructions

This section explains what to do if the generated data changes, e.g. when updating *labels.json*.
The procedure is similar to the one in the "lobid-resources repo":https://github.com/hbz/lobid-resources.

h2. Errors in tests

After your changes you build the project like:
@mvn clean install@

A *BUILD FAILURE* results when newly generated data isn't equal to the test resources. This is a good thing because you wanted the change!

Doing @mvn test -DgenerateTestData=true@ the test data is generated and also updated in the filesystem.
These new data will now act as the template for sucessful tests. So, if you would rebuild now, the build will pass successfully.
You just must approve the new outcome by committing it.

So, let's see what has changed:

@git status@

Let's make a diff on the changes, e.g. all JSON-LD documents:

@git diff  src/test/resources/output/json/@

If you are satisfied with the changes, go ahead - add and commit them:

@git add src/test/resources/jsonld/; git commit@

Do this respectivly for all other test files (Ntriples).
If you've added and commited everything, check again if all is ok:

@mvn clean install@

This should result in *BUILD SUCCESS*. Push your changes. You're done :)

h1. License

GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.<commit_msg>Update infos about log4j and bash script for updating test files.<commit_after>
!https://travis-ci.org/hbz/lobid-rdf-to-json.png?branch=master!:https://travis-ci.org/hbz/lobid-rdf-to-json

h1. About

Converts lobid Ntriples created in https://github.com/hbz/lobid-resources to nested JSON-LD using etikett generated configuration.

h1. Build

"!https://secure.travis-ci.org/hbz/lobid-resources.png?branch=master!":https://travis-ci.org/hbz/lobid-resources

Prerequisites: Java 8, Maven 3; verify with @mvn -version@

Create and change into a folder where you want to store the projects:

* @git clone https://github.com/hbz/lobid-rdf-to-json.git@
* @cd lobid-resources@
* @mvn clean install -DskipTests@

See the @.travis.yml@ file for details on the CI config used by Travis.

h1. Developer instructions

This section explains what to do if the generated data changes, e.g. when updating *labels.json*.
The procedure is similar to the one in the "lobid-resources repo":https://github.com/hbz/lobid-resources.

h2. Errors in tests

After your changes you build the project like:
@mvn clean install@

A *BUILD FAILURE* results when newly generated data isn't equal to the test resources. This is a good thing because you wanted the change!

Doing @mvn test -DgenerateTestData=true@ the test data is generated and also updated in the filesystem.
These new data will now act as the template for sucessful tests. So, if you would rebuild now, the build will pass successfully.
You just must approve the new outcome by committing it.

So, let's see what has changed:

@git status@

Let's make a diff on the changes, e.g. all JSON-LD documents:

@git diff  src/test/resources/output/json/@

If you are satisfied with the changes, go ahead - add and commit them:

@git add src/test/resources/jsonld/; git commit@

Do this respectivly for all other test files (Ntriples).
If you've added and commited everything, check again if all is ok:

@mvn clean install@

This should result in *BUILD SUCCESS*. Push your changes. You're done :)

If you get errors from building the project, change the log4j.xml file to get more detailed error messages after @mvn test@:
@<priority value="info"/>@ to @<priority value="debug"/>@.

For updating the old test files in lobid-rdf-to-json use:

@bash src/test/resources/copyNtriplesToLobid-Rdf-To-Json.sh@.

h1. License

GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
{'fraction_non_alphanumeric': 0.08835092075315538, 'fraction_numerical': 0.007862611214566521, 'mean_word_length': 4.23726977248104, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3570922', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1482, 'n_words': 634}