Skip to content

Commit

Permalink
(#53) shellcheck scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
odanoburu committed Jun 25, 2018
1 parent b3ab43e commit bc1272c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 7 additions & 8 deletions tools/prepare-delaf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 2 additions & 1 deletion tools/prepare-freeling.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit bc1272c

Please sign in to comment.