From a9ea533e1995fd1f0071b5ee497e2a94c4d71fc4 Mon Sep 17 00:00:00 2001 From: Rico Sennrich Date: Tue, 2 Apr 2013 15:10:37 +0200 Subject: [PATCH] version bump (0.20) --- changelog | 10 ++++++++++ core/ParZu-parser.pl | 4 ---- core/ParZu_parameters.pl | 8 ++++++++ core/grammar_german.pl | 14 -------------- evaluation/eval.pl | 18 ++++++++++++++++++ 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/changelog b/changelog index 89a2c81..070e09a 100755 --- a/changelog +++ b/changelog @@ -1,5 +1,15 @@ ParZu changelog +0.20 2013/04/02 + - retrained statistics for disambiguation module (on Europarl) + - new extraction process + - new statistics for some ambiguities (adv vs. pred) + - improved parse selection for n-best tagging + - some morphological agreement constraints are now soft constraints + (configurable through option `relax_agreement` in ParZu_parameters.pl) + - various grammar improvements + - remove deprecated index declarations (now slower on SWI-Prolog versions before 5.11.29) + 0.19 2013/01/19 - new output options - graphical output diff --git a/core/ParZu-parser.pl b/core/ParZu-parser.pl index 2a01248..a397130 100755 --- a/core/ParZu-parser.pl +++ b/core/ParZu-parser.pl @@ -16,10 +16,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- dynamic chart/10, scores/5, inccount/1, lastpos/1, tops_chart/4, statschart/8, perlevel/1, sentno/1, output/7, outputformat/1, sentdelim/1, returnsentdelim/1, nbestmode/1, morphology/1, lemmatisation/1, case_nom/2, case_acc/2, case_dat/2, case_gen/2, gender_neut/2. -:- index(chart(1,1,1,0,0,0,0,1,0,0));true. %% only has an effect in SWI -:- index(head(1,1,1,0,0,0,0,0,0,0));true. -:- index(scores(1,1,1,1,0));true. - :- ensure_loaded('tree_textual.pl'). :- assert(outputformat(raw)). :- assert(sentdelim('$.')). diff --git a/core/ParZu_parameters.pl b/core/ParZu_parameters.pl index b0f7fe9..edd0545 100755 --- a/core/ParZu_parameters.pl +++ b/core/ParZu_parameters.pl @@ -1,5 +1,13 @@ %% ParZu PARAMETER FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%allow some structures that are strictly speaking ungrammatical (based on POS tags), but because of tagging errors, including them still helps +% set to 'no' to disable. +correct_mistagging(yes). + +%allow some structures that are strictly speaking ungrammatical (based on morphological constraints), but because of errors of the morphology tool and/or typos in the text, including them still helps. +% set to 'no' to disable. +relax_agreement(yes). + %modus(fileout). % output to file, batch, without showing ASCII parsetrees modus(showparses). % show ASCII parsetree diff --git a/core/grammar_german.pl b/core/grammar_german.pl index d9608bb..20439f5 100644 --- a/core/grammar_german.pl +++ b/core/grammar_german.pl @@ -5,20 +5,6 @@ :- style_check(-discontiguous). :- ensure_loaded('helper_predicates.pl'). -:- index(get_case(0,1,0,1));true. -:- index(get_number(0,1,0,1));true. -:- index(get_gender(0,1,0,1));true. -:- index(get_person(0,1,0,1));true. -:- index(get_degree(0,1,0,1));true. - -%allow some structures that are strictly speaking ungrammatical (based on POS tags), but because of tagging errors, including them still helps -% set to 'no' to disable. -correct_mistagging(yes). - -%allow some structures that are strictly speaking ungrammatical (based on morphological constraints), but because of errors of the morphology tool and/or typos in the text, including them still helps. -% set to 'no' to disable. -relax_agreement(yes). - %====================================================================================== %determiners diff --git a/evaluation/eval.pl b/evaluation/eval.pl index 0b33210..31fad03 100755 --- a/evaluation/eval.pl +++ b/evaluation/eval.pl @@ -243,6 +243,15 @@ ; write('division by 0 error') ), + nl, + write('f1: '), + ( ( TP > 0, + F1 is Precision*Recall*2 / (Precision + Recall), + format('~4f', F1) + ) + ; + write('division by 0 error') + ), nl, !. printresult(Class) :- result(Class,TP,FP,FN,WA), @@ -274,6 +283,15 @@ ; write('division by 0 error') ), +% nl, +% write('f1: '), +% ( ( TP > 0, +% F1 is Precision*Recall*2 / (Precision + Recall), +% format('~4f', F1) +% ) +% ; +% write('division by 0 error') +% ), nl, !.