-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapertium-yid.yid.twol
More file actions
94 lines (66 loc) · 2.68 KB
/
Copy pathapertium-yid.yid.twol
File metadata and controls
94 lines (66 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Alphabet
א אַ אָ ב בּ בֿ ג ד ה ו וּ ז ח חּ ט י יִ ך כ כּ ל ם מ ן נ ס ע ף פ פּ פֿ ץ צ ק ר שׁ שׂ ש ת תּ װ ױ ײ ײַ יי וו
׳ ״
·ּ ־
%{ь%}:0 %{ь2%}:0 %>:0 %{ױ%}:ױ %{ע%}:0 %{ס%}:ס %{ן%}:ן
;
Sets
Vowel = אַ אָ יִ י ו וּ ע ױ ײ ײַ %{ױ%} ;
Cons = א ב בּ בֿ ג ד ה ז ח חּ ט י ך כ כּ ל ם מ ן נ ס ף פ פּ פֿ ץ צ ק ר ש שׂ ת תּ װ ;
Rules
!!!!!!!! ORTHOGRAPHIC RULES !!!!!!!!
"Change final letters to non-final when not word-final"
Cx:Cy <=> _ :0* [ :Cons | :Vowel ] ;
where
Cx in ( ם ן ך ף ץ )
Cy in ( מ נ כ פֿ צ )
matched ;
"Change non-final letters to non-final when word-final"
Cx:Cy <=> _ .#. ;
where
Cx in ( מ נ כ פ פֿ צ )
Cy in ( ם ן ך ף ף ץ )
matched ;
!!!!!!!! CONSONANT RULES !!!!!!!!
"Delete final ט of verb stems when ט follows"
ט:0 <=> _ %>: :ט .#. ;
"Delete final ס of verb stems when ס follows"
ס:0 <=> _ %>: :ס :ט .#. ;
"Final ן is ם after stems ending with ן or vowels"
%{ן%}:ם <=> ן: %>: %{ע%}: _ .#. ;
[ :ײַ | :ו ] %>: %{ע%}: _ .#. ;
!@ מ ײַ ן:נ %>:0 %{ע%}:ע ן:ם ;
!! בײַם, צום
"Delete ס after another ס"
%{ס%}:0 <=> :ס/:0* _ ;
!!!!!!!! VOWEL RULES !!!!!!!!
"Epenthesise ע as needed"
%{ע%}:ע <=> [ [ :נ :ג ] | :מ | :נ | :ל ]/:0 _ [ ן: | %{ן%}: ] ; ! after ל, מ, נ, נג in ן suffixes
[ :מ | :ײַ | :ו ]/:0 _ :נ ; ! after ײַ and מ in pprs
!!!!!!!! UMLAUT RULES !!!!!!!!
"Umlaut first vowel of words if {ь} occurs later in word"
Vx:Vy <=> .#. :Cons* _ [ :Cons | :Vowel | [ :0 - [ %{ь%}: | %{ь2%}: ] ] ]* %{ь%}:0 ;
where
Vx in ( ױ א אַ אָ ו וּ %{ױ%} )
Vy in ( ײַ ע ע ע י י ײ )
matched ;
"Umlaut first vowel of words if {ь2} occurs later in word"
Vx:Vy <=> .#. :Cons* _ [ :Cons | :Vowel | [ :0 - [ %{ь2%}: | %{ь%}: ] ] ]* %{ь2%}:0 ;
except
.#. :י _ [ :Cons | :Vowel | [ :0 - [ %{ь2%}: | %{ь%}: ] ] ]* %{ь2%}:0 ;
where
Vx in ( ױ אַ ו ײ )
Vy in ( ע ע י ע )
matched ;
"Umlaut first vowel of words if {ь2} occurs later in word after י"
Vx:Vy <=> .#. :י _ [ :Cons | :Vowel | [ :0 - [ %{ь2%}: | %{ь%}: ] ] ]* %{ь2%}:0 ;
where
Vx in ( ױ אַ ו ײ )
Vy in ( ע ע יִ ע )
matched ;
! Resources:
! https://wiki.apertium.org/wiki/Starting_a_new_language_with_HFST#Enter_twol
! https://kitwiki.csc.fi/twiki/bin/view/KitWiki/HfstHome
! http://hfst.sourceforge.net/
! https://wiki.apertium.org/wiki/Twol
! https://wiki.apertium.org/wiki/Hfst