netlify.toml
corpusScorer
This repository contains two scripts:
-
stats.py
computes some statistics about an ODRL corpus (made of natural language files and the corresponding ODRL files) -
scorer.py
compares the ODRL files of a corpus with the ODRL output of a system such as Tenet that translates natural language into ODRL.
The script main.py
combines these two scripts.
Expected input
The inputs are expected to be directories containing the corpus sentences (text files with extension .txt
), corpus ODRL or system output files (turtle files with extension .ttl
). These files must be named in a consistent way: the ODRL corpus file and the ODRL output file corresponding to a NL file <name>.txt
both must be named <name>.ttl
.
Usage
-
main.py
:
$ python3 main.py <corpus_sentence_directory> <corpus_sentence_directory> <output_odrl_directory>
Where:
+ <corpus_sentence_directory>
is a path to the directory containing the corpus sentences
+ <corpus_sentence_directory>
is a path to the directory containing the corpus ODRL representations
+ <output_odrl_directory>
is a path to the directory containing the ODRL representations produced by the evaluated system (e.g. Tenet)