Talk:Starting a new language with HFST

From Apertium
Jump to navigation Jump to search

Lexicon

Multichar_Symbols
%<n%>   ! Существительное
%<nom%> ! Именительный
%<pl%>  ! Множественное число

%{A%}	! 'a' или 'е', часть архифонемы
%>	! Граница морфем

LEXICON Root

NounStems;

LEXICON Ninfl

%<n%>: #;
%<n%>%<pl%>:%>l%{A%}r #;

LEXICON NounStems

maşgala Ninfl;! " семья "
esger Ninfl;! "солдат"

Twol

Alphabet
 A B Ç D E Ä F G H I J Ž K L M N
 Ň O Ö P R S Ş T U Ü W Y Ý Z
 a b ç d e ä f g h i j ž k l m n
 ň o ö p r s ş t u ü w y ý z
 %{A%}:a %>:0 ;
 
Sets
 
Consonant = B Ç D F G H J Ž K L M N Ň P R S Ş T W Z
            b ç d f g h j ž k l m n ň p r s ş t w z ;
FrontVowel = Ä E I Ö Ü ä e i ö ü ;  
BackVowel = A Y O U a y o u ;
NonBack = Consonant FrontVowel %> ;
NonFront = Consonant BackVowel %> ;
 
Rules
 
"Front harmony in suffixes"
%{A%}:e <=> FrontVowel: NonBack:*  _ ;

Makefile

all:
	hfst-lexc apertium-tr-tk.tk.lexc -o tk-tr.lexc.hfst 
	hfst-twolc -R -i apertium-tr-tk.tk.twol -o tk-tr.twol.hfst
	hfst-compose-intersect -1 tk-tr.lexc.hfst -2 tk-tr.twol.hfst -o tr-tk.autogen.hfst
	hfst-fst2strings tr-tk.autogen.hfst

Revisions

Revision 1980

$ make
hfst-lexc apertium-tr-tk.tk.lexc -o tk-tr.lexc.hfst 
hfst-lexc: warning: Defaulting to foma type (since it has native lexc support);
Use command-line option --format to override
Root...1, Ninfl...2, NounStems...2
Building lexicon...
Determinizing...
Minimizing...
Done!
hfst-twolc -R -i apertium-tr-tk.tk.twol -o tk-tr.twol.hfst
Reading input from apertium-tr-tk.tk.twol.
Writing output to tk-tr.twol.hfst.

syntax error, unexpected SYMBOL_SPACE
on line 6:
Sets
Aborted.

make: *** [all] Ошибка 1


Revision 1986

$ make
hfst-lexc apertium-tr-tk.tk.lexc -o tk-tr.lexc.hfst 
hfst-lexc: warning: Defaulting to foma type (since it has native lexc support);
Use command-line option --format to override
Root...1, Ninfl...2, NounStems...2
Building lexicon...
Determinizing...
Minimizing...
Done!
hfst-twolc -R -i apertium-tr-tk.tk.twol -o tk-tr.twol.hfst
Reading input from apertium-tr-tk.tk.twol.
Writing output to tk-tr.twol.hfst.

syntax error, unexpected SYMBOL_SPACE
on line 6:
Sets
Aborted.

make: *** [all] Ошибка 1


Revision 1987

$ make
hfst-lexc apertium-tr-tk.tk.lexc -o tk-tr.lexc.hfst 
hfst-lexc: warning: Defaulting to foma type (since it has native lexc support);
Use command-line option --format to override
Root...1, Ninfl...2, NounStems...2
Building lexicon...
Determinizing...
Minimizing...
Done!
hfst-twolc -R -i apertium-tr-tk.tk.twol -o tk-tr.twol.hfst
Reading input from apertium-tr-tk.tk.twol.
Writing output to tk-tr.twol.hfst.

syntax error, unexpected SYMBOL_SPACE
on line 6:
Sets
Aborted.

make: *** [all] Ошибка 1


Revision 1990

$ make
hfst-lexc apertium-tr-tk.tk.lexc -o tk-tr.lexc.hfst 
hfst-lexc: warning: Defaulting to foma type (since it has native lexc support);
Use command-line option --format to override
Root...1, Ninfl...2, NounStems...2
Building lexicon...
Determinizing...
Minimizing...
Done!
hfst-twolc -R -i apertium-tr-tk.tk.twol -o tk-tr.twol.hfst
Reading input from apertium-tr-tk.tk.twol.
Writing output to tk-tr.twol.hfst.

syntax error, unexpected SYMBOL_SPACE
on line 6:
Sets
Aborted.

make: *** [all] Ошибка 1