# Copyright © 2010 by Jaak Pruulmann-Vengerfeldt.
# All rights reserved. 

read regex  [@"rules.fst"].i .o. [@"lex.fst"];
save lex-av.fst
clear

read lexc arvud.txt
save arvud.fst
clear

read regex [ @re"deriv_filter.txt" .o.
		[[@"lex_exc.fst"] .P. [@"lex-av.fst"]] .o.
		~$"#" .o.
		@"rules.fst" ] 
	| @"arvud.fst"
;
save lihtsonad.fst 
clear

read lexc liitsona_full.txt
save liitsonamask.fst
clear

read lexc liitsona_filter_full.txt
save liitsonafilter.fst
clear


read regex ("-" "&") [ @"lihtsonad.fst" "&" ("-" "&") ]* @"lihtsonad.fst" ("&" "-");
save full-compound.fst
clear

read regex 	@"liitsonafilter.fst" .o. 
		@"liitsonamask.fst" .o. 
		@"full-compound.fst" .o. 
		[ "&" -> "" ];

# kuni compoundidega midagi kavalat ei tehta
save eesti.fst


