# Annotation Reporter

## Description

The annotation reporter produces concordance-style reports on the content annotations in a given set of documents, either in CSV or text form. The CSV file contains the following columns:

 file the name of the document from which the entry is drawn start the start index, in characters, of the span in the document end the end index, in characters, of the span in the document left context the context to the left of the start index text the text in between the start and end indices label the label on the span in the document. If the annotation contains attributes and values, these will be represented in the label right context the context to the right of the end index

It's also possible to omit the left and right contexts, if you prefer. The text file contains the same columns, except that file, start, and end are collapsed into a single location column. It's also possible to interpolate document-level statistics such as file length and number of annotations per label into these reports.

Because the CSV files contain language data, please consult this special note on how to view them.

## Usage

### Example 2

Let's say that you only want textual output, and you don't want the concordance columns:

Unix:% $MAT_PKG_HOME/bin/MATReport --input_files /path/to/file --txt \--output_dir /path/to/output --omit_concordance_contextWindows native:> %MAT_PKG_HOME%\bin\MATReport.cmd --input_files c:\path\to\file --txt \--output_dir c:\path\to\output --omit_concordance_context ### Example 3 Let's say you have a directory full of files. /path/to/files contains files of the form file<n>.json. You want to view them both in CSV and in text, and you want a smaller concordance window of 10 characters. Unix:%$MAT_PKG_HOME/bin/MATReport --input_files '/path/to/files/*.json' \--csv --txt --output_dir /path/to/output --concordance_window 10Windows native:> %MAT_PKG_HOME%\bin\MATReport.cmd --input_files 'c:\path\to\files\*.json' \-csv --txt --output_dir c:\path\to\output --concordance_window 10

For each file in /path/to/hyp, this invocation will prepare a candidate filename to look for in /path/to/ref by removing the .txt.json suffix and adding the .json suffix. The current directory will contain bytag.csv and bytoken.csv.