From bc1272cddb734b79a5f770f2004225fcf44e1e74 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Mon, 25 Jun 2018 13:57:46 +0000 Subject: [PATCH] (#53) shellcheck scripts --- tools/prepare-delaf.sh | 15 +++++++-------- tools/prepare-freeling.sh | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/prepare-delaf.sh b/tools/prepare-delaf.sh index 25d72a14..97c105ac 100644 --- a/tools/prepare-delaf.sh +++ b/tools/prepare-delaf.sh @@ -5,30 +5,29 @@ # tr -d '\r' < Delaf2015v04.dic > delaf.dic function splitW31 { - sed "s/\(.*W\)31$/\13s\n\11s/" + sed "s/\\(.*W\\)31$/\\13s\\n\\11s/" } # adjectives -grep -F ".A:" $1 > delaf.adj +grep -F ".A:" "$1" > delaf.adj # adverbs -grep -F ".ADV$" $1 > delaf.adv +grep -F ".ADV$" "$1" > delaf.adv # nouns -grep -F ".N:" $1 | # select nouns -#remove uppercase lemmas (Gloria) +grep -F ".N:" "$1" | # select nouns +#remove uppercase lemmas (as in Gloria) grep -v ",[A-Z]" > delaf.nouns # # simple verbs - grep -F ".V:" $1 | # select simple verbs + grep -F ".V:" "$1" | # select simple verbs sed "s/:,/,/" | # rm entries like mantinhas:,manter.V:I2s # # sorri,sorrir.V:Y2S -> sorri,sorrir.V:Y2s sed "s/2S$/2s/" | # split entries like abstrair,abstrair.V:W31 splitW31 > delaf.verbs # verbs with clitics -grep -F ".V+PRO:" $1 | # select verbs with clitics +grep -F ".V+PRO:" "$1" | # select verbs with clitics # rm spurious colon like in abstinhas:-lhe,abster.V+PRO:I2s sed "s/:-/-/" | splitW31 > delaf.clitics - diff --git a/tools/prepare-freeling.sh b/tools/prepare-freeling.sh index af908a30..49e87e78 100644 --- a/tools/prepare-freeling.sh +++ b/tools/prepare-freeling.sh @@ -1,6 +1,7 @@ #!/bin/bash # first argument if path to directory where freeling dictionary files -# are, with their original names +# are, with their original names (see +# https://github.com/TALP-UPC/FreeLing/tree/v4.1/data/pt/dictionary/entries) # adjectives # change C as diminutive tag to D (as is in nouns)