forked from GitHub/gf-rgl
(Morphodict) change name + document script
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
USAGE="usage: ./remove_sense_distinctions.sh <concrete syntax file>"
|
USAGE="usage: ./remove_sense_distinctions.sh <concrete syntax file>"
|
||||||
|
NOTE="This is not extremely useful, it will just create a file with only those entries that are homonymous in dictionary form, but differ in other forms. The purpose of the file is for you to look at/do small experiments with. The real job is done in MkMorphoDict.hs."
|
||||||
|
|
||||||
# String manipulation
|
# String manipulation
|
||||||
CONC=$1 # e.g. MorphoDictFin.gf
|
CONC=$1 # e.g. MorphoDictFin.gf
|
||||||
@@ -9,6 +10,7 @@ BAK="$CONC.bak" # e.g. MorphoDictFin.gf.bak
|
|||||||
NAME=`echo $CONC | cut -f 1 -d '.'` # e.g. MorphoDictFin
|
NAME=`echo $CONC | cut -f 1 -d '.'` # e.g. MorphoDictFin
|
||||||
ABS="${NAME}Abs.gf" # e.g. MorphoDictFinAbs.gf
|
ABS="${NAME}Abs.gf" # e.g. MorphoDictFinAbs.gf
|
||||||
CONC_HEADER="$NAME.header" # e.g. MorphoDictFin.header
|
CONC_HEADER="$NAME.header" # e.g. MorphoDictFin.header
|
||||||
|
ABS_HEADER="${NAME}Abs.header" # e.g. MorphoDictFinAbs.header
|
||||||
|
|
||||||
find_duplicates() {
|
find_duplicates() {
|
||||||
echo "Putting (temporarily) only homonyms in $CONC"
|
echo "Putting (temporarily) only homonyms in $CONC"
|
||||||
@@ -33,13 +35,17 @@ remove_numbers() {
|
|||||||
echo "Done removing numbers."
|
echo "Done removing numbers."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#### Action starts here
|
||||||
|
|
||||||
|
echo $NOTE
|
||||||
|
|
||||||
if [[ $CONC == *"Abs.gf" ]]
|
if [[ $CONC == *"Abs.gf" ]]
|
||||||
then
|
then
|
||||||
echo $USAGE
|
echo $USAGE
|
||||||
else
|
else
|
||||||
remove_numbers
|
remove_numbers
|
||||||
find_duplicates
|
find_duplicates
|
||||||
echo "gf -v=0 -make $CONC"
|
# echo "gf -v=0 -make $CONC"
|
||||||
gf -v=0 -make $CONC
|
# gf -v=0 -make $CONC
|
||||||
echo "$CONC contains now only homonyms. Original file is found in $BAK."
|
echo "$CONC contains now only homonyms. Original file is found in $BAK."
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user