Skip to content

Commit

Permalink
fjerna test av cmp former, testen mangler foreløpig test av selve lem…
Browse files Browse the repository at this point in the history
…maet
  • Loading branch information
leneantonsen committed Jun 30, 2023
1 parent f7c1a8a commit 76558b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
16 changes: 8 additions & 8 deletions test/src/morphology/generate-noun-lemmas.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ EXTEDITOR=@SEE@
# --include "(CmpN/Only| R | Rreal )" \
# $source_file > $comp_lemmas

grep ' R.*€' $source_file | cut -d '' -f2 > testcmplemma.txt
grep ' R.*€' $source_file | cut -d '+' -f1 > $comp_lemmas
#grep ' R.*€' $source_file | cut -d '€' -f2 > testcmplemma.txt
#grep ' R.*€' $source_file | cut -d '+' -f1 > $comp_lemmas

###### Start testing: #######
transducer_found=0
Expand Down Expand Up @@ -128,18 +128,18 @@ for f in $fsttype; do

###### Test compounds: #######
# Test nouns that only can generate as compounds:
sed 's/$/+N+Cmp\/SgNom+Cmp\/Hyph+Cmp#gåetie+N+Sg+Nom/' $comp_lemmas \
| $lookup_tool $generator_file.$suffix \
| grep "\-" | cut -f2| cut -d "-" -f1 > $generated_comp_lemmas.$f.txt
# sed 's/$/+N+Cmp\/SgNom+Cmp\/Hyph+Cmp#gåetie+N+Sg+Nom/' $comp_lemmas \
# | $lookup_tool $generator_file.$suffix \
# | grep "\-" | cut -f2| cut -d "-" -f1 > $generated_comp_lemmas.$f.txt

###### Collect results, and generate debug info if FAIL: #######
# Sort and compare original input with resulting output - the diff is
# used to generate lemmas which are opened in SEE:
sort -u -o $generated_lemmas.$f.txt $generated_lemmas.$f.txt
sort -u -o $generated_comp_lemmas.$f.txt $generated_comp_lemmas.$f.txt
# sort -u -o $generated_comp_lemmas.$f.txt $generated_comp_lemmas.$f.txt
comm -23 $lemmas $generated_lemmas.$f.txt > $result_file.$f.txt
# comm -23 $comp_lemmas $generated_lemmas.$f.txt \
comm -23 testcmplemma.txt $generated_comp_lemmas.$f.txt \
# comm -23 testcmplemma.txt $generated_comp_lemmas.$f.txt \
>> $result_file.$f.txt

# Open the diff file in SubEthaEdit (if there is a diff):
Expand Down Expand Up @@ -184,4 +184,4 @@ if [ $transducer_found -eq 0 ]; then
fi

# When done, remove the generated data file:
#rm -f $lemmas $comp_lemmas $generated_lemmas* $generated_comp_lemmas*
rm -f $lemmas $generated_lemmas*
6 changes: 0 additions & 6 deletions test/src/morphology/testcmplemma.txt
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
scenografi
idiot
saxofon
sceneri
scenografi
semikolon

0 comments on commit 76558b8

Please sign in to comment.