Update copyright years
[m17n/m17n-contrib.git] / im / yi-yivo.mim
1 ;; yi-yivo.mim -- Yiddish input method with YIVO transliteration
2 ;; Copyright (C) 2010
3 ;; Raghav Krishnapriyan (raghav.r.krishnapriyan@gmail.com)
4
5 ;; This file is part of the m17n contrib; a sub-part of the m17n
6 ;; library.
7
8 ;; The m17n library is free software; you can redistribute it and/or
9 ;; modify it under the terms of the GNU Lesser General Public License
10 ;; as published by the Free Software Foundation; either version 2.1 of
11 ;; the License, or (at your option) any later version.
12
13 ;; The m17n library is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 ;; Lesser General Public License for more details.
17
18 ;; You should have received a copy of the GNU Lesser General Public
19 ;; License along with the m17n library; if not, write to the Free
20 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 ;; Boston, MA 02110-1301, USA.
22
23 (input-method yi yivo)
24                                                                                         
25 (description "Yiddish input method using YIVO transliteration.
26 A short description of the YIVO transliteration scheme can be found here: http://www.ibiblio.org/pub/academic/languages/yiddish/mendele/vol4.170
27 A description of the YIVO orthography can be found in Mordkhe Schaechter, _Der eynheytlekher Yidisher oysleyg: Takones fun yidishn oysleyg_, New York: Yivo and Yiddish Language Resource Center of the League for Yiddish (6th ed. 1999).
28 ")
29                                                                                         
30 (title "ייִדיש")
31 (map
32   (initials
33         ("i" "אי")
34         ("u" "או")
35         ("ey" "אײ")
36         ("ay" "אײַ")
37         ("oy" "אױ")
38         ("ayo" "אַיאָ")
39   )
40   (initdiph
41         ("e" ?ע)
42         ("a" "אַ")
43         ("o" "אָ")
44   )
45   (otherchars
46         ("A") ("b") ("d") ("f") ("g") ("h") ("H") ("k") ("l") ("m") ("n") ("p") ("r") ("s") ("S") ("t") ("u") ("v") ("y") ("z") ("B") ("K") ("T") ("W")
47   )
48   (allchars
49         ("A") ("b") ("d") ("f") ("g") ("h") ("H") ("k") ("l") ("m") ("n") ("p") ("r") ("s") ("S") ("t") ("u") ("v") ("y") ("z") ("B") ("K") ("T") ("W") ("a") ("e") ("o") ("i") ("u")
50   )
51   (medials
52         ("A" ?א)
53         ("b" ?ב)
54         ("d" ?ד)
55         ("e" ?ע)
56         ("ey" "ײ")
57         ("f" ?ף)
58         ("g" ?ג)
59         ("h" ?ה)
60         ("H" ?ח)
61         ("i" ?י)
62         ("k" ?ק)
63         ("kh" ?ך)
64         ("l" ?ל)
65         ("m" ?ם)
66         ("n" ?ן)
67         ("oy" "ױ")
68         ("r" ?ר)
69         ("s" ?ס)
70         ("sh" ?ש)
71         ("S" ?ת)
72         ("t" ?ט)
73         ("ts" ?ץ)
74         ("u" ?ו)
75         ("v" "װ")
76         ("y" ?י)
77         ("z" ?ז)
78         ("a" "אַ")
79         ("B" "בֿ")
80         ("ay" "ײַ")
81         ("K" "כּ")
82         ("o" "אָ")
83         ("p" "פּ")
84         ("T" "תּ")
85         ("tsh" "טש")
86         ("W" "שׂ")
87         ("zh" "זש")
88         ("uv" "וּװ")
89         ("vu" "װוּ")
90         ("yi" "ייִ")
91         ("ui" "ויִ")
92         ("eyi" "ײיִ")
93         ("ie" "יִע")
94         ("ei" "עיִ")
95         ("iu" "יִו")
96         ("ii" "יִיִ")
97         ("ayi" "ײַיִ")
98         ("ayo" "אַיאָ")
99         ("ia" "יִאַ")
100         ("io" "יִאָ")
101         ("uvu" "וּװוּ")    ; For words like "tsuvuks!"
102   )
103   (abbreviations
104         ("s'" "ס'")
105         ("m'" "מ'")
106         ("kh'" "כ'")
107   )
108   (openquotes ("\"" "„"))
109   (closequotes ("\"" "‟") ("?\"" "?‟") (".\"" ".‟") ("!\"" "!‟"))
110   (parentheses
111         ("\(" "\)")
112         ("\)" "\(")
113   )
114   (makef ("-" "־"))
115   (gershayim
116         ("`" "׳")
117         ("``" "״")
118   )
119   (backspace
120         ((BackSpace) (undo)))
121 )
122                                                                                         
123 (state 
124   (init
125         (initials (shift subsq))
126         (initdiph)
127         (openquotes)
128         (otherchars (pushback 1) (shift subsq))
129         (backspace)
130         (parentheses)
131   )
132   (subsq
133         (allchars 
134                 (pushback 1)
135                 (cond
136                         ((= @-1 ?ף) (delete @-1) (insert "פֿ"))
137                         ((= @-1 ?ך) (delete @-1) (insert ?כ))
138                         ((= @-1 ?ם) (delete @-1) (insert ?מ))
139                         ((= @-1 ?ן) (delete @-1) (insert ?נ))
140                         ((= @-1 ?ץ) (delete @-1) (insert ?צ))
141                 )
142                 (shift letters))
143         (closequotes)
144         (gershayim)
145         (makef (shift init))
146         (backspace)
147         (nil (shift init))
148   )
149   (letters
150         (medials (shift subsq))
151         (abbreviations (shift init))
152         (nil (shift subsq))
153   )
154 )