Skip to content

Commit

Permalink
Revised code to output LEXC files in a specific order.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarppe committed Nov 11, 2024
1 parent 2168647 commit 9c11ad3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/fst/morphology/incoming/resplit/aggregate-lexc.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh

ls root.lexc noun_prefixes.lexc noun_stems.lexc noun_suffixes.lexc verb_prefixes.lexc prevn.lexc verb_stems.lexc verb_suffixes.lexc particles.lexc pronouns.lexc ../dem.lexc |
echo 'root.lexc noun_prefixes.lexc noun_stems.lexc noun_suffixes.lexc verb_prefixes.lexc prevn.lexc verb_stems.lexc verb_suffixes.lexc particles.lexc pronouns.lexc ../dem.lexc' |

gawk 'BEGIN { printf "!! Blackfoot morphotax\n\n" > "lexicon.lexc"; }
{
file=$0;
while((getline line < file)!=0)
printf "%s\n", line >> "lexicon.lexc";
printf "\n\n" >> "lexicon.lexc";
gawk 'BEGIN { printf "!! Blackfoot morphotax -- aggregate of all LEXC files\n\n" > "lexicon.lexc"; }
{ nf=split($0, files, " ");
for(i=1; i<=nf; i++)
{
while((getline line < files[i])!=0)
printf "%s\n", line >> "lexicon.lexc";
printf "\n\n" >> "lexicon.lexc";
}
}'

0 comments on commit 9c11ad3

Please sign in to comment.