bn-avro.js 5.81 KB
Newer Older
priyank's avatar
priyank committed
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
( function ( $ ) {
	'use strict';

	var bnAvro = {
		id: 'bn-avro',
		name: 'অভ্র',
		description: 'Bengali Avro input method',
		date: '2012-10-10',
		URL: 'http://github.com/wikimedia/jquery.ime',
		author: 'Junaid P V',
		license: 'GPLv3',
		version: '1.0',
		contextLength: 4,
		maxKeyLength: 5,
		patterns: [
			['([ক-হড়ঢ়য়])্?ররi','[^o`]', '$1ৃ'],
			['ররi','[^o`]', ''],
			['ঙহo', 'ঙ্ঘ'],
			['([ক-হড়ঢ়য়])াZ', '[^o`]', '$1্যা'],
			['(([ক-হড়ঢ়য়])|য়)o','[^o`]', '$1'], // য় cannot be included in the range, why? everywhere else it is OK!
			['([ক-হড়ঢ়য়])a','[^o`]', '$1া'],
			['([ক-হড়ঢ়য়])i','[^o`]', '$1ি'],
			['([ক-হড়ঢ়য়])(I|েe)','[^o`]', '$1ী'],
			['([ক-হড়ঢ়য়])u','[^o`]', '$1ু'],
			['([ক-হড়ঢ়য়])U','[^o`]', '$1ূ'],
			['([ক-হড়ঢ়য়])o','[o`]', '$1ু'],
			['([ক-হড়ঢ়য়])e','[^o`]', '$1ে'],
			['([ক-হড়ঢ়য়])োI','[^o`]', '$1ৈ'],
			['([ক-হড়ঢ়য়])O','[^o`]', '$1ো'],
			['([ক-হড়ঢ়য়])োU','[^o`]', '$1ৌ'],

			['([ক-হড়ঢ়য়][িুেো]|[এইওউ])a','[^o`]', '$1য়া'],
			['([ক-হড়ঢ়য়][াে]|[আএ])o', '[^o`]', '$1ও'],

			['([কঙলষস])(k|K)','[^o`]','$1্ক'],
			['([ঙদল])(g|G)','[^o`]','$1্গ'],
			['গg','[^o`]','জ্ঞ'],
			['([চশ])c','[^o`]','$1্চ'],
			['([জঞব])j','[^o`]','$1্জ'],
			['নj','[^o`]','ঞ্জ'],
			['([কটণনপলষস])T','[^o`]','$1্ট'],
			['([ডণনল])D','[^o`]','$1্ড'],
			['([গষহ])N','[^o`]','$1্ণ'],
			['([কতনপশসহ])t','[^o`]','$1্ত'],
			['([দনব])d','[^o`]','$1্দ'],
			['([গঘণতধনপমশসহ])n','[^o`]','$1্ন'],
			['([পমলষস])p','[^o`]','$1্প'],
			['([স])f', '[^o`]', '$1্ফ'],
			['([বমল])b','[^o`]','$1্ব'],
			['([দম])(v|V)','[^o`]','$1্ভ'],
			['([কগঙটণতদধনমলশষসহ])m','[^o`]','$1্ম'],
			['([ক-ঘচ-ঝট-যলশ-হড়ঢ়য়])r','[^o`]','$1্র'],
			['([কগপ-বমলশসহ])l','[^o`]','$1্ল'],
			['([কনপ])s','[^o`]','$1্স'],
			['([ক-হড়ঢ়য়])w','[^o`]','$1্ব'],
			['([ক-হড়ঢ়য়])y','[^o`]','$1্য'],
			['নc','[^o`]','ঞ্চ'],

			['ত`','`', ''],

			['ক্ক(h|H)','[^o`]','ক্ষ'],
			['কশ(h|H)','[^o`]','ক্ষ'],

			['ররk','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ক'],
			['ররg','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্গ'],
			['ররc','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্চ'],
			['ররj','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্জ'],
			['ররT','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ট'],
			['ররD','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ড'],
			['ররN','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ণ'],
			['ররt','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ত'],
			['ররd','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্দ'],
			['ররn','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ন'],
			['ররp','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্প'],
			['ররf','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ফ'],
			['ররb','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ব'],
			['ররv','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ভ'],
			['ররm','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ম'],
			['ররz','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্য'],
			['ররl','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ল'],
			['ররS','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্শ'],
			['ররs','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্স'],
			['ররh','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্হ'],
			['ররR','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্ড়'],
			['রর(y|Y)','(o|a|i|I|u|U|e|O|OI|OU|rri)rr','র্য়'],

			['ংo', 'ঙ্গ'],
			['ংi', 'ঙ্গি'],
			['ংI', 'ঙ্গী'],
			['(ংu|ঙ্গo)', 'ঙ্গু'],
			['ংU', 'ঙ্গূ'],
			['', 'ঙ্গি'],
			['', 'ঙ্গি'],

			['শ(h|H)','S', ''],

			['অo','[^`]', ''],
			['এe','[^o`]', ''],

			['ক(h|H)','[^o`]', ''],
			['গ(h|H)','[^o`]', ''],
			['ণg','[^o`]', ''],
			['চ(h|H)','[^o`]', ''],
			['জ(h|H)','[^o`]', ''],
			['ণG','[^o`]', ''],
			['ট(h|H)','[^o`]', ''],
			['ড(h|H)','[^o`]', ''],
			['ত(h|H)','[^o`]', ''],
			['দ(h|H)','[^o`]', ''],
			['প(h|H)','[^o`]', ''],
			['ব(h|H)','[^o`]', ''],
			['(স(h|H))','[^o`]', ''],
			['ড়(h|H)','[^o`]', ''],
			['ত্`','[^o`]', ''],
			['নg','[^o`]', ''],
			['ঃ`','[^o`]', ':'],
			['ররi','[^o`]', ''],
			['ওI','[^o`]', ''],
			['ওU','[^o`]', ''],

			['আ`', ''],
			['ই`', 'ি'],
			['ঈ`', ''],
			['উ`', ''],
			['ঊ`', ''],
			['এ`', ''],
			['আ`', ''],
			['আ`', ''],
			['আ`', ''],
			['আ`', ''],
			['আ`', ''],
			['আ`', ''],

			['([kKqQ])', ''],
			['(g|G)', ''],
			['(c|C)', ''],
			['(j|J)', ''],
			['T', ''],
			['D', ''],
			['N', ''],
			['t', ''],
			['d', ''],
			['n', ''],
			['(p|P)', ''],
			['f', ''],
			['(b|B)', ''],
			['(v|V)', ''],
			['(m|M)', ''],
			['z', ''],
			['r', ''],
			['(l|L)', ''],
			['S', ''],
			['s', ''],
			['(h|H)', ''],
			['R', ''],
			['w', ''],
			['x', 'ক্স'],
			['(y|Y)', ''],

			['Z', '্য'],

			['o', ''],
			['(a|A)', ''],
			['i', ''],
			['I', ''],
			['u', ''],
			['U', ''],
			['(e|E)', ''],
			['O', ''],

			['0', ''],
			['1', ''],
			['2', ''],
			['3', ''],
			['4', ''],
			['5', ''],
			['6', ''],
			['7', ''],
			['8', ''],
			['9', ''],

			['\\\\\\.', '.'],

			[',,', ''],
			['\\:', ''],
			['\\^', ''],
			['\\.', ''],
			['\\$', ''],
			['ঃ`', ':'],
			['`', '']]
	};

	$.ime.register( bnAvro );
}( jQuery ) );