Skip to content

Commit

Permalink
Files for testing paradigms of numerals.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trondtr committed Sep 13, 2024
1 parent 8dcd910 commit 3500716
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
34 changes: 34 additions & 0 deletions devtools/num_minip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# script to generate paradigms for generating word forms
# command:
# sh generate_contlex_para.sh PATTERN
# example, when you are in smn:
# sh devtools/noun_minip.sh LAAVU | less
# sh devtools/noun_minip.sh smiergâs
# Only get the lemma you ask for:
# sh devtools/noun_minip.sh '^smiergâs[:+]'


LOOKUP=$(echo $LOOKUP)
HLOOKUP=$(echo $HLOOKUP)
GTLANGS=$(echo $GTLANGS)


PATTERN=$1
L_FILE="in.txt"
#cut -d '!' -f1 src/fst/morphology/stems/nouns.lexc | egrep $PATTERN |grep -v Err | tr '+' ':'| cut -d ':' -f1>$L_FILE
echo $PATTERN > $L_FILE

P_FILE="test/data/testnumparadigm.txt"

for lemma in $(cat $L_FILE);
do
for form in $(cat $P_FILE);
do
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-smn/src/fst/generator-gt-norm.hfstol # hfst
# echo "${lemma}${form}" | $LOOKUP $GTLANGS/lang-smn/src/fst/generator-gt-norm.xfst # xfst
done
rm -f $L_FILE
done

14 changes: 14 additions & 0 deletions test/data/testnumparadigm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
+Num+Sg+Nom
+Num+Sg+Gen
+Num+Sg+Ill
+Num+Sg+Loc
+Num+Sg+Com
+Num+Ess
+Num+Pl+Nom
+Num+Pl+Gen
+Num+Pl+Ill
+Num+Pl+Loc
+Num+Pl+Com



0 comments on commit 3500716

Please sign in to comment.