diff --git a/tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh b/tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh index 56d5c6c1..5c8d99cf 100755 --- a/tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh +++ b/tools/shellscripts/add-lexicon-and-tag-flags-2-lexc.sh @@ -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ân@P.LEXICON.VERB_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ân@P.LEXICON.VERB_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; diff --git a/tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh b/tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh index 32dc7fcd..cc4cf4cb 100755 --- a/tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh +++ b/tools/shellscripts/parse-fst-output-string-4-lexicon-and-tag-flags.sh @@ -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ân@P.LEXICON.VERB_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ân@P.LEXICON.VERB_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++)