F1 calculator (Shallow Parser)

Download ]

There are two scripts in this package, rec_prec.pl and rec_prec3.pl. The first computes precision, recall and F1 values for bracketed data, where only exact matches are considered successful. The second also computes these values for phrases which overlap. Each takes two arguments: a file with the gold standard bracketing for the sample text, and the test output in bracketed format. Bracketed format in this case means the format used for the Shallow Parser/Named Entity tagger:

[PHRASETAG1 (POSTAG1 WORD1) (POSTAG2 WORD2)...][PHRASETAG2 ... ]...

Usage:

rec_prec.pl gold_standard_br_file test_output_br_file