Skip to content
Snippets Groups Projects
Commit 74ee7a4c authored by Alexis Nasr's avatar Alexis Nasr
Browse files

fine tuning in datcha

parent d7432fee
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ $orfeo2datcha{"NOM"} = "NOM";
$orfeo2datcha{"PCT"} = "PUN";
$orfeo2datcha{"PRE"} = "PRP";
$orfeo2datcha{"PRO"} = "PRO";
$orfeo2datcha{"PRQ"} = "PRO:RE%";
$orfeo2datcha{"PRQ"} = "PRO:RE";
$orfeo2datcha{"VNF"} = "VER:infi";
$orfeo2datcha{"VPP"} = "VER:pper";
$orfeo2datcha{"VPR"} = "VER:ppre";
......
MCF_TRAIN=../data/treebank/train.mcf
MCF_DEV=../data/treebank/test.mcf
MCF_TEST=../data/treebank/test.mcf
EVAL_MCF=/home/alexis/gitlab/maca_data2/tools/eval_mcf.pl
EVAL_MCF=../../tools/eval_mcf.pl
CFF_TRAIN=train.cff
CFF_CUTOFF_TRAIN=train.cutoff.cff
......@@ -63,10 +63,17 @@ total: test_Wp test_WP test_wp test_cp test_S test_L
clean:
- rm -f test_W
- rm -f test_c
- rm -f test_w
- rm -f test_P
- rm -f test_WP
- rm -f test_Wp
- rm -f test_cp
- rm -f test_wp
- rm -f total
- rm test_L
- rm test_p[c]
- rm test_p[w]
- rm test_p[W]
- rm test_S
......@@ -2,20 +2,20 @@ b0U1
b0sgn
b1sgn
b2sgn
b0f
#b1f
#b2f
b0len
bm1f
bm2f
b0f
b1f
b2f
b0len
bm1p
bm2p
bm3p
bm3p bm2p
bm2p bm1p
bm2p bm3p
bm1p b0sgn
b0s1
b0s1 b0s2
#b0s1
#b0s1 b0s2
b0s1 b0s2 b0s3
b0s1 b0s2 b0s3 b0s4
......@@ -25,6 +25,7 @@ $tilt2datcha_pos{"SYM"} = "NOM";
$tilt2datcha_pos{"URL"} = "NOM";
$tilt2datcha_pos{"HEURE"} = "NOM";
$tilt2datcha_pos{"XXX"} = "NOM";
$tilt2datcha_pos{"VER:impe"} = "VER";
$tilt2datcha_pos{"ADJ"} = "ADJ";
......@@ -40,7 +41,6 @@ $tilt2datcha_pos{"PRO"} = "PRO";
$tilt2datcha_pos{"PRP"} = "PRP";
$tilt2datcha_pos{"PUN"} = "PUN";
$tilt2datcha_pos{"VER"} = "VER";
$tilt2datcha_pos{"VER:impe"} = "VER:impe";
$tilt2datcha_pos{"VER:infi"} = "VER:infi";
$tilt2datcha_pos{"VER:pper"} = "VER:pper";
$tilt2datcha_pos{"VER:ppre"} = "VER:ppre";
......@@ -90,6 +90,7 @@ while(<>){
chop;
#Bonjour Bonjour OK INT bonjour tchat1 TC [00:11:09] Bonjour IV
($A, $B, $C, $D, $E, $F, $G, $H, $I, $J) = split /\t/;
if($A eq "XX") {next;}
$form =~ s/ /_/g;
$lemma =~ s/ /_/g;
$cpos = $tilt2datcha_cpos{$pos};
......
......@@ -3,6 +3,7 @@ FTB_DIR=../../../data/ftb
TRAIN=$(FTB_DIR)/ftb.train.conll07
TEST=$(FTB_DIR)/ftb.test.conll07
DEV=$(FTB_DIR)/ftb.dev.conll07
THRESHOLD=50
compile: train.mcf test.mcf dev.mcf train.conll07 test.conll07 dev.conll07
......
......@@ -3,13 +3,16 @@ TOOLS=../../../tools
compile: train.mcf test.mcf dev.mcf
train.mcf: $(TRAIN)
$(TOOLS)/conllu2mcf -f $< -1W -2C -3L -4H -5D > $@
$(TOOLS)/conll_keep_most_frequent_morpho_tags.pl $< $(THRESHOLD) > tmp
$(TOOLS)/conllu2mcf -f tmp -1W -2C -3L -4H -5D > $@
test.mcf: $(TEST)
$(TOOLS)/conllu2mcf -f $< -1W -2C -3L -4H -5D > $@
$(TOOLS)/conll_keep_most_frequent_morpho_tags.pl $< $(THRESHOLD) > tmp
$(TOOLS)/conllu2mcf -f tmp -1W -2C -3L -4H -5D > $@
dev.mcf: $(TEST)
$(TOOLS)/conllu2mcf -f $< -1W -2C -3L -4H -5D > $@
$(TOOLS)/conll_keep_most_frequent_morpho_tags.pl $< $(THRESHOLD) > tmp
$(TOOLS)/conllu2mcf -f tmp -1W -2C -3L -4H -5D > $@
clean:
- rm test.mcf train.mcf dev.mcf
- rm test.mcf train.mcf dev.mcf tmp
......@@ -200,11 +200,13 @@ while(<REF>){
# print "$ref_form \t $ref_lemma \t $hyp_lemma\n";
}
if($ref_lemma eq $hyp_lemma){
if(lc $ref_lemma eq lc $hyp_lemma){
$correct_lemma_total_nb++;
}
else{
# print "$ref_form \t $ref_lemma \t $hyp_lemma\n";
# if($ref_pos eq "v"){
# print "$ref_form \t $ref_pos \t $ref_lemma \t $hyp_lemma\n";
# }
}
$ref_dist = $ref_gov - $ref_index;
$hyp_dist = $hyp_gov - $hyp_index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment