! Testing weighted automata: ! -------------------------- ! To test this file testweights.lexc, do the following: ! ! Compile: ! hfst-lexc -v -o testweights.hfst testweights.lexc ! ! Then invert: Write ! hfst-xfst ! load testweights.hfst ! invert net ! save itest.hfst ! ! Then test: ! hfst-lookup itest.hfst ! ! Then write words like cat, cats, partners, walks ! Documentation: https://kitwiki.csc.fi/twiki/bin/view/KitWiki/HfstLexc Multichar_Symbols +Sg +Pl +Prs +Sg3 +N +V LEXICON Root verbs ; nouns ; determiners ; dummies ; LEXICON nouns cat Num "weight: 1.3" ; dog Num "weight: 1.3" ; sand Mass "weight: 1.3" ; partner Num "weight: 1.3" ; walk Num "weight: 10.3" ; LEXICON verbs walk Per "weight: 1.3" ; partner Per "weight: 10.3" ; LEXICON Num +N+Sg: # "weight: 1.3" ; +N+Pl:s # "weight: 4.3" ; LEXICON Mass +N+Sg: # "weight: 1.3" ; +N+Pl:s # "weight: 10.3" ; LEXICON Per +V+Prs: # "weight: 1.3" ; +V+Prs+Sg3:s # "weight: 4.3" ; LEXICON determiners the det ; a det ; LEXICON det +Det: # ; LEXICON dummies testword # "weight: 1" ; testword # "weight: 2" ;