# Evaluation Test Data

## What is it?

The evaluation test data is the data used in the tests that evaluate functionality and performance of OpenNLP. These tests ensure reliability and can help identify potential bugs, errors, or performance issues.

The evaluation tests leverage the k-fold cross-validation procedure. This technique works by dividing the evaluation data into `k` equally sized parts or folds. The algorithm is then trained on `k-1` of the folds and tested on the remaining fold. This process is repeated `k` times, so that each of the k-folds is used exactly once as the test data, and the results of each fold are combined to produce an overall estimate of the algorithm's performance.

## Where is it?

OpenNLP evaluation tests data is available at https://nightlies.apache.org/opennlp/ (file name: `opennlp-data.zip`)

Here's a link to the evaluation-tests build on Jenkins.

## How to use the evaluation test data to run test?

The evaluation tests data can be downloaded and saved in the desired directory and can be used to run OpenNLP Evaluation Tests as below:

    mvn test -DOPENNLP_DATA_DIR=/path/to/opennlp-eval-test-data/ -Peval-tests

## How to change evaluation data?

OpenNLP Evaluation Tests use nightlies.apache.org to share data for testing and releasing candidate build. You can also upload the opennlp-data.zip to `nightlies.apache.org` as below:

    curl -u your_asf_username -T ./opennlp-data.zip "https://nightlies.apache.org/opennlp/"

More information about changing the evaluation test data on `nightlies.apache.org` can be found at: https://nightlies.apache.org/authoring.html