Skip to content

Commit

Permalink
oppdaterte stier
Browse files Browse the repository at this point in the history
  • Loading branch information
leneantonsen committed Jan 25, 2024
1 parent d2a11c6 commit 34976ef
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions devtools/adj_minip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GTLANGS=$(echo $GTLANGS)

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

#P_FILE="test/data/testadjparadigm.txt"
P_FILE="test/data/adj_paradigm.txt"
Expand All @@ -23,7 +23,7 @@ for lemma in $(cat $L_FILE);
do
for form in $(cat $P_FILE);
do
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/generator-gt-norm.hfstol
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/morphology/generator-gt-norm.hfstol
done
rm -f $L_FILE
done
Expand Down
4 changes: 2 additions & 2 deletions devtools/noun_minip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ GTLANGS=$(echo $GTLANGS)

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

P_FILE="test/data/testnounparadigm.txt"

for lemma in $(cat $L_FILE);
do
for form in $(cat $P_FILE);
do
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/generator-gt-norm.hfstol
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/morphology/generator-gt-norm.hfstol
done
rm -f $L_FILE
done
Expand Down
4 changes: 2 additions & 2 deletions devtools/prop_minip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

PATTERN=$1
L_FILE="in.txt"
cut -d '!' -f1 src/fst/generated_files/smi-sma-propernouns.lexc | grep $PATTERN | tr '+' ':' | cut -d ':' -f1 | tr -d '%'>$L_FILE
cut -d '!' -f1 src/fst/morphology/generated_files/smi-sma-propernouns.lexc | grep $PATTERN | grep -v Err| tr '+' ':' | cut -d ':' -f1 | tr -d '%'>$L_FILE

P_FILE="test/data/testpropparadigm.txt"

for lemma in $(cat $L_FILE);
do
for form in $(cat $P_FILE);
do
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/generator-gt-norm.hfstol
echo "${lemma}${form}" | $HLOOKUP $GTLANGS/lang-sma/src/fst/generator-gt-norm.hfstol
done
rm -f $L_FILE
done
Expand Down
10 changes: 5 additions & 5 deletions devtools/tag_test.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#shell script to see if there are tags which are not declared in root.lexc or if tags are misspelled

echo 'Are there tags not declared in root.lexc or misspelled?'
cat src/fst/clitics.lexc src/fst/compounding.lexc src/fst/affixes/*lexc src/fst/stems/*lexc ../shared-smi/src/fst/stems/*lexc |cut -d '!' -f1 |grep ' ;' | cut -d ':' -f1 |rev |cut -d ' ' -f1 |rev |sed 's/+/¢+/g' |sed 's/@/¢@/g'|tr '¢' '\n' | tr '#"' '\n'| egrep '(\+|@)' |sort -u | egrep -v '^(\+|\+%|\+\/\-|\+Cmp\-|\+Cmp%\-|\@0|\@%)$' > lexctags
cat src/fst/morphology/clitics.lexc src/fst/morphology/compounding.lexc src/fst/affixes/*lexc src/fst/morphology/stems/*lexc ../shared-smi/src/fst/morphology/stems/*lexc |cut -d '!' -f1 |grep ' ;' | cut -d ':' -f1 |rev |cut -d ' ' -f1 |rev |sed 's/+/¢+/g' |sed 's/@/¢@/g'|tr '¢' '\n' | tr '#"' '\n'| egrep '(\+|@)' |sort -u | egrep -v '^(\+|\+%|\+\/\-|\+Cmp\-|\+Cmp%\-|\@0|\@%)$' > lexctags

cat src/fst/root.lexc |cut -d '!' -f1 |cut -d ':' -f1 |sed 's/+/¢+/g'|sed 's/@/¢@/g' |tr '¢' '\n' | egrep '(\+|@)' |tr -d ' ' | tr -d '\t'|sort -u > roottags
cat src/fst/morphology/root.lexc |cut -d '!' -f1 |cut -d ':' -f1 |sed 's/+/¢+/g'|sed 's/@/¢@/g' |tr '¢' '\n' | egrep '(\+|@)' |tr -d ' ' | tr -d '\t'|sort -u > roottags

echo 'Have a look at these:'

comm -23 lexctags roottags
echo 'Checking for double semicolon in stem files:'
cat src/fst/stems/*lexc |cut -d '!' -f1 |grep ';.*;'
cat src/fst/morphology/stems/*lexc |cut -d '!' -f1 |grep ';.*;'

echo 'Checking for missing Der-tags:'
cat src/fst/stems/*lexc |cut -d '!' -f1 |grep '\+Der/.*;' |egrep -v 'Der([1234]|\+)'
cat src/fst/morphology/stems/*lexc |cut -d '!' -f1 |grep '\+Der/.*;' |egrep -v 'Der([1234]|\+)'

echo 'Checking for double Sem-tags:'
cat src/fst/stems/*lexc |cut -d '!' -f1 |grep '+Sem.*+Sem'
cat src/fst/morphology/stems/*lexc |cut -d '!' -f1 |grep '+Sem.*+Sem'



Expand Down
4 changes: 2 additions & 2 deletions devtools/verb_minip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ GTLANGS=$(echo $GTLANGS)

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

P_FILE="test/data/testverbparadigm.txt"

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

0 comments on commit 34976ef

Please sign in to comment.