Difference: HfstMonishGuesserAnalyzerScript (1 vs. 2)

Revision 22016-05-18 - KristerLinden

Line: 1 to 1
 
META TOPICPARENT name="HfstAllPages"

HFST: Monish Guesser Analyzer Script

Line: 50 to 50
 
<--  
-->
-- ErikAxelson - 2011-10-20
Added:
>
>
META PREFERENCE name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="FinCLARIN.ViewFinClarinWideEngTemplate"

Revision 12011-10-20 - ErikAxelson

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="HfstAllPages"

HFST: Monish Guesser Analyzer Script

For more information, see HfstMonishGuesserAnalyzer.

echo '[ i | e |  |  ]' | hfst-regexp2fst -f $FORMAT > FrontV

echo '[ u | o |  | a ]' | hfst-regexp2fst -f $FORMAT > BackV

echo '[ %^U | %^O | %^ | %^A ]' | hfst-regexp2fst -f $FORMAT > MorphoV

echo '[ [ ? - [ @"BackV" | @"MorphoV" ] ]+ & $[ @"FrontV" ] ] |' \
      [ [ ? - [ @"FrontV" | @"MorphoV" ] ]+ & $[ @"BackV" ] ]' | \
        hfst-regexp2fst -f $FORMAT > Root

echo '[ %+Int .x. [ %^U %^U k ] ]' | hfst-regexp2fst -f $FORMAT > Suff1

echo '[ %+Perf .x. [ %^O n ] ] | ' \
     '[ %+Imperf .x. [ %^ m b ] ] | ' \
     '[ %+Opt .x. [ %^U d d ] ] ' > Suff2

echo '[ %+True .x. [ %^A n k ] ] | ' \
     '[ %+Belief .x. [ %^A %^A v %^O  t ] ] | ' \
     '[ %+Doubt .x. [ %^U %^U z ] ] | ' \
     '[ %+False .x. [ %^ q ] ] ' > Suff3

echo '[ %+1P %+Sg .x. %^A %^A b %^A ] |' \
     '[ %+2P %+Sg .x. %^ m %^A ] |' \
     '[ %+3P %+Sg .x. %^U v v %^U ] |' \
     '[ %+1P %+Pl %+Excl .x. %^A %^A b %^O r %^A ] |' \
     '[ %+1P %+Pl %+Incl .x. %^A %^A b %^U g %^A ] |' \
     '[ %+2P %+Pl .x. %^ m %^O r %^A ] |' \
     '[ %+3P %+Pl .x. %^U v v %^O r %^U ]' > Suff4

echo '[ %^U -> u , %^O -> o, %^ ->  , %^A -> a || @"BackV" ?* _ ]' | \
     hfst-regexp2fst -f $FORMAT > Rule1

echo '[ %^U -> i , %^O -> e , %^ ->  , %^A ->  ]' | \
     hfst-regexp2fst -f $FORMAT > Rule2

echo '[ @"Root" (@"Suff1") @"Suff2" (@"Suff3") @"Suff4" ]' | \
     hfst-regexp2fst -f $FORMAT | \
     hfst-compose -2 Rule1 | hfst-compose -2 Rule2 \
       > MonishGuesserAnalyzer


<--  
-->
-- ErikAxelson - 2011-10-20
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback