Skip to content

Commit

Permalink
Added usage examples to both scripts, which include the use of both.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarppe committed Nov 4, 2024
1 parent cfc48fc commit 5be7d4f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/sh

# add-lexicon-and-tag-flags-2-lexc.sh

# Usage:
# 1. cat lexicon.lexc | tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh > lexicon_flags.lexc
# 2. foma: read lexc lexicon_flags.lexc
# 3. foma: set show-flags ON
# 4. foma: down nipâw+V+AI+Ind+1Pl => @P.LEXICON.Root@@P.LEXICON.VerbPrefixes@@U.order.indep@@P.LEXICON.INDEPENDENT@@U.person.NI@nit2<@P.LEXICON.VERBPREFIXES@@U.wici.NULL@@P.LEXICON.VERBSTEMS@nipâ@P.LEXICON.VAIae@@P.FSTTAG.+V@@P.FSTTAG.+AI@@P.LEXICON.VAIae_WICI@@U.wici.NULL@@P.LEXICON.VAIae_ORDER@@P.FSTTAG.+Ind@@U.order.indep@@P.LEXICON.VAIae_IND_PERSON@@U.person.NI@@P.LEXICON.VAIw_IND_NI@@P.LEXICON.VAIw_IND_NI_PL_SUFFIX@@P.FSTTAG.+1Pl@>n2â[email protected]_ENDLEX@@D.frag.FRAG@@D.cnj.CC@@D.joiner.NULL@
# 5. echo '@P.LEXICON.Root@@P.LEXICON.VerbPrefixes@@U.order.indep@@P.LEXICON.INDEPENDENT@@U.person.NI@nit2<@P.LEXICON.VERBPREFIXES@@U.wici.NULL@@P.LEXICON.VERBSTEMS@nipâ@P.LEXICON.VAIae@@P.FSTTAG.+V@@P.FSTTAG.+AI@@P.LEXICON.VAIae_WICI@@U.wici.NULL@@P.LEXICON.VAIae_ORDER@@P.FSTTAG.+Ind@@U.order.indep@@P.LEXICON.VAIae_IND_PERSON@@U.person.NI@@P.LEXICON.VAIw_IND_NI@@P.LEXICON.VAIw_IND_NI_PL_SUFFIX@@P.FSTTAG.+1Pl@>n2â[email protected]_ENDLEX@@D.frag.FRAG@@D.cnj.CC@@D.joiner.NULL@' | tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh

gawk 'BEGIN { mcs=0; }
{
line[NR]=$0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/sh

# parse-fst-output-string-4-lexicon-and-tag-flags.sh

# Usage:
# 1. cat lexicon.lexc | tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh > lexicon_flags.lexc
# 2. foma: read lexc lexicon_flags.lexc
# 3. foma: set show-flags ON
# 4. foma: down nipâw+V+AI+Ind+1Pl => @P.LEXICON.Root@@P.LEXICON.VerbPrefixes@@U.order.indep@@P.LEXICON.INDEPENDENT@@U.person.NI@nit2<@P.LEXICON.VERBPREFIXES@@U.wici.NULL@@P.LEXICON.VERBSTEMS@nipâ@P.LEXICON.VAIae@@P.FSTTAG.+V@@P.FSTTAG.+AI@@P.LEXICON.VAIae_WICI@@U.wici.NULL@@P.LEXICON.VAIae_ORDER@@P.FSTTAG.+Ind@@U.order.indep@@P.LEXICON.VAIae_IND_PERSON@@U.person.NI@@P.LEXICON.VAIw_IND_NI@@P.LEXICON.VAIw_IND_NI_PL_SUFFIX@@P.FSTTAG.+1Pl@>n2â[email protected]_ENDLEX@@D.frag.FRAG@@D.cnj.CC@@D.joiner.NULL@
# 5. echo '@P.LEXICON.Root@@P.LEXICON.VerbPrefixes@@U.order.indep@@P.LEXICON.INDEPENDENT@@U.person.NI@nit2<@P.LEXICON.VERBPREFIXES@@U.wici.NULL@@P.LEXICON.VERBSTEMS@nipâ@P.LEXICON.VAIae@@P.FSTTAG.+V@@P.FSTTAG.+AI@@P.LEXICON.VAIae_WICI@@U.wici.NULL@@P.LEXICON.VAIae_ORDER@@P.FSTTAG.+Ind@@U.order.indep@@P.LEXICON.VAIae_IND_PERSON@@U.person.NI@@P.LEXICON.VAIw_IND_NI@@P.LEXICON.VAIw_IND_NI_PL_SUFFIX@@P.FSTTAG.+1Pl@>n2â[email protected]_ENDLEX@@D.frag.FRAG@@D.cnj.CC@@D.joiner.NULL@' | tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh

gawk '{
n=split($0, a, "@P\\.LEXICON\\.[^@]+@", s);
for(i=1; i<=n-1; i++)
Expand Down

0 comments on commit 5be7d4f

Please sign in to comment.