-
Notifications
You must be signed in to change notification settings - Fork 18
/
Uyghur.cs
4151 lines (4003 loc) · 95.5 KB
/
Uyghur.cs
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Created by SharpDevelop.
* User: Gheyret Kenji
* Date: 2020/11/12
* Time: 8:24
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.IO;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using System.Linq;
/// <summary>
/// Description of Uyghur.
/// </summary>
public class Uyghur
{
public const int UYGIN_HM = 0;
public const int UYGIN_A = 1;
public const int UYGIN_E = 2;
public const int UYGIN_B = 3;
public const int UYGIN_P = 4;
public const int UYGIN_T = 5;
public const int UYGIN_J = 6;
public const int UYGIN_CH = 7;
public const int UYGIN_X = 8;
public const int UYGIN_D = 9;
public const int UYGIN_R = 10;
public const int UYGIN_Z = 11;
public const int UYGIN_ZZ = 12;
public const int UYGIN_S = 13;
public const int UYGIN_SH = 14;
public const int UYGIN_GH = 15;
public const int UYGIN_F = 16;
public const int UYGIN_Q = 17;
public const int UYGIN_K = 18;
public const int UYGIN_G = 19;
public const int UYGIN_NG = 20;
public const int UYGIN_L = 21;
public const int UYGIN_M = 22;
public const int UYGIN_N = 23;
public const int UYGIN_H = 24;
public const int UYGIN_O = 25;
public const int UYGIN_U = 26;
public const int UYGIN_OO = 27;
public const int UYGIN_UU = 28;
public const int UYGIN_W = 29;
public const int UYGIN_EE = 30;
public const int UYGIN_I = 31;
public const int UYGIN_Y = 32;
public const int UYGIN_LA = 33;
// Uyghurce Unicode (kona yeziq heriplerning Unicodesi)
//A
public const char UYG_UN_A_6 = '\u0627'; //Yalghuz
public const char UYG_UN_A_Y = '\uFE8D'; //Yalghuz
public const char UYG_UN_A_A = '\uFE8E'; //Ayaq
// E Heripi
public const char UYG_UN_E_6 = '\u06D5'; //Yalghuz;
public const char UYG_UN_E_Y = '\uFEE9'; //Yalghuz;
public const char UYG_UN_E_A = '\uFEEA'; //Ayaq;
// B
public const char UYG_UN_B_6 = '\u0628'; //Yalghuz;
public const char UYG_UN_B_Y = '\uFE8F'; //Yalghuz;
public const char UYG_UN_B_A = '\uFE90'; //Ayaq;
public const char UYG_UN_B_B = '\uFE91'; //Bax;
public const char UYG_UN_B_O = '\uFE92'; //Ottura;
//P
public const char UYG_UN_P_6 = '\u067E'; //Yalghuz;
public const char UYG_UN_P_Y = '\uFB56'; //Yalghuz;
public const char UYG_UN_P_A = '\uFB57'; //Ayaq;
public const char UYG_UN_P_B = '\uFB58'; //Bax;
public const char UYG_UN_P_O = '\uFB59'; //Ottura;
//T
public const char UYG_UN_T_6 = '\u062A'; //Yalghuz;
public const char UYG_UN_T_Y = '\uFE95'; //Yalghuz;
public const char UYG_UN_T_A = '\uFE96'; //Ayaq;
public const char UYG_UN_T_B = '\uFE97'; //Bax;
public const char UYG_UN_T_O = '\uFE98'; //Ottura;
//J
public const char UYG_UN_J_6 = '\u062C'; //Yalghuz;
public const char UYG_UN_J_Y = '\uFE9D'; //Yalghuz;
public const char UYG_UN_J_A = '\uFE9E'; //Ayaq;
public const char UYG_UN_J_B = '\uFE9F'; //Bax;
public const char UYG_UN_J_O = '\uFEA0'; //Ottura;
//Ch
public const char UYG_UN_CH_6 = '\u0686'; //Yalghuz;
public const char UYG_UN_CH_Y = '\uFB7A'; //Yalghuz;
public const char UYG_UN_CH_A = '\uFB7B'; //Ayaq;
public const char UYG_UN_CH_B = '\uFB7C'; //Bax;
public const char UYG_UN_CH_O = '\uFB7D'; //Ottura;
//X
public const char UYG_UN_X_6 = '\u062E'; //Yalghuz;
public const char UYG_UN_X_Y = '\uFEA5'; //Yalghuz;
public const char UYG_UN_X_A = '\uFEA6'; //Ayaq;
public const char UYG_UN_X_B = '\uFEA7'; //Bax;
public const char UYG_UN_X_O = '\uFEA8'; //Ottura;
//D
public const char UYG_UN_D_6 = '\u062F'; //Yalghuz;
public const char UYG_UN_D_Y = '\uFEA9'; //Yalghuz;
public const char UYG_UN_D_A = '\uFEAA'; //Ayaq;
//R
public const char UYG_UN_R_6 = '\u0631'; //Yalghuz;
public const char UYG_UN_R_Y = '\uFEAD'; //Yalghuz;
public const char UYG_UN_R_A = '\uFEAE'; //Ayaq;
//Z
public const char UYG_UN_Z_6 = '\u0632'; //Yalghuz;
public const char UYG_UN_Z_Y = '\uFEAF'; //Yalghuz;
public const char UYG_UN_Z_A = '\uFEB0'; //Ayaq;
//Z..
public const char UYG_UN_ZZ_6 = '\u0698'; //Yalghuz;
public const char UYG_UN_ZZ_Y = '\uFB8A'; //Yalghuz;
public const char UYG_UN_ZZ_A = '\uFB8B'; //Ayaq;
//S
public const char UYG_UN_S_6 = '\u0633'; //Yalghuz;
public const char UYG_UN_S_Y = '\uFEB1'; //Yalghuz;
public const char UYG_UN_S_A = '\uFEB2'; //Ayaq;
public const char UYG_UN_S_B = '\uFEB3'; //Bax;
public const char UYG_UN_S_O = '\uFEB4'; //Ottura;
//SH
public const char UYG_UN_SH_6 = '\u0634'; //Yalghuz;
public const char UYG_UN_SH_Y = '\uFEB5'; //Yalghuz;
public const char UYG_UN_SH_A = '\uFEB6'; //Ayaq;
public const char UYG_UN_SH_B = '\uFEB7'; //Bax;
public const char UYG_UN_SH_O = '\uFEB8'; //Ottura;
//GH
public const char UYG_UN_GH_6 = '\u063A'; //Yalghuz;
public const char UYG_UN_GH_Y = '\uFECD'; //Yalghuz;
public const char UYG_UN_GH_A = '\uFECE'; //Ayaq;
public const char UYG_UN_GH_B = '\uFECF'; //Bax;
public const char UYG_UN_GH_O = '\uFED0'; //Ottura;
//F
public const char UYG_UN_F_6 = '\u0641'; //Yalghuz;
public const char UYG_UN_F_Y = '\uFED1'; //Yalghuz;
public const char UYG_UN_F_A = '\uFED2'; //Ayaq;
public const char UYG_UN_F_B = '\uFED3'; //Bax;
public const char UYG_UN_F_O = '\uFED4'; //Ottura;
//Q
public const char UYG_UN_Q_6 = '\u0642'; //Yalghuz;
public const char UYG_UN_Q_Y = '\uFED5'; //Yalghuz;
public const char UYG_UN_Q_A = '\uFED6'; //Ayaq;
public const char UYG_UN_Q_B = '\uFED7'; //Bax;
public const char UYG_UN_Q_O = '\uFED8'; //Ottura;
//K
public const char UYG_UN_K_6 = '\u0643'; //Yalghuz;
public const char UYG_UN_K_Y = '\uFED9'; //Yalghuz;
public const char UYG_UN_K_A = '\uFEDA'; //Ayaq;
public const char UYG_UN_K_B = '\uFEDB'; //Bax;
public const char UYG_UN_K_O = '\uFEDC'; //Ottura;
//G
public const char UYG_UN_G_6 = '\u06AF'; //Yalghuz;
public const char UYG_UN_G_Y = '\uFB92'; //Yalghuz;
public const char UYG_UN_G_A = '\uFB93'; //Ayaq;
public const char UYG_UN_G_B = '\uFB94'; //Bax;
public const char UYG_UN_G_O = '\uFB95'; //Ottura;
//NG
public const char UYG_UN_NG_6 = '\u06AD'; //Yalghuz;
public const char UYG_UN_NG_Y = '\uFBD3'; //Yalghuz;
public const char UYG_UN_NG_A = '\uFBD4'; //Ayaq;
public const char UYG_UN_NG_B = '\uFBD5'; //Bax;
public const char UYG_UN_NG_O = '\uFBD6'; //Ottura;
//L
public const char UYG_UN_L_6 = '\u0644'; //Yalghuz;
public const char UYG_UN_L_Y = '\uFEDD'; //Yalghuz;
public const char UYG_UN_L_A = '\uFEDE'; //Ayaq;
public const char UYG_UN_L_B = '\uFEDF'; //Bax;
public const char UYG_UN_L_O = '\uFEE0'; //Ottura;
//M
public const char UYG_UN_M_6 = '\u0645'; //Yalghuz;
public const char UYG_UN_M_Y = '\uFEE1'; //Yalghuz;
public const char UYG_UN_M_A = '\uFEE2'; //Ayaq;
public const char UYG_UN_M_B = '\uFEE3'; //Bax;
public const char UYG_UN_M_O = '\uFEE4'; //Ottura;
//N
public const char UYG_UN_N_6 = '\u0646'; //Yalghuz;
public const char UYG_UN_N_Y = '\uFEE5'; //Yalghuz;
public const char UYG_UN_N_A = '\uFEE6'; //Ayaq;
public const char UYG_UN_N_B = '\uFEE7'; //Bax;
public const char UYG_UN_N_O = '\uFEE8'; //Ottura;
//H..
public const char UYG_UN_H_6 = '\u06BE'; //Yalghuz;
public const char UYG_UN_H_Y = '\uFBAA'; //Yalghuz;
public const char UYG_UN_H_A = '\uFBAB'; //Ayaq;
public const char UYG_UN_H_B = '\uFBAC'; //Bax;
public const char UYG_UN_H_O = '\uFBAD'; //Ottura;
//O
public const char UYG_UN_O_6 = '\u0648'; //Yalghuz;
public const char UYG_UN_O_Y = '\uFEED'; //Yalghuz;
public const char UYG_UN_O_A = '\uFEEE'; //Ayaq;
//U
public const char UYG_UN_U_6 = '\u06C7'; //Yalghuz;
public const char UYG_UN_U_Y = '\uFBD7'; //Yalghuz;
public const char UYG_UN_U_A = '\uFBD8'; //Ayaq;
//O..
public const char UYG_UN_OO_6 = '\u06C6'; //Yalghuz;
public const char UYG_UN_OO_Y = '\uFBD9'; //Yalghuz;
public const char UYG_UN_OO_A = '\uFBDA'; //Ayaq;
//U..
public const char UYG_UN_UU_6 = '\u06C8'; //Yalghuz;
public const char UYG_UN_UU_Y = '\uFBDB'; //Yalghuz;
public const char UYG_UN_UU_A = '\uFBDC'; //Ayaq;
//W
public const char UYG_UN_W_6 = '\u06CB'; //Yalghuz;
public const char UYG_UN_W_Y = '\uFBDE'; //Yalghuz;
public const char UYG_UN_W_A = '\uFBDF'; //Ayaq;
//E..
public const char UYG_UN_EE_6 = '\u06D0'; //Yalghuz;
public const char UYG_UN_EE_Y = '\uFBE4'; //Yalghuz;
public const char UYG_UN_EE_A = '\uFBE5'; //Ayaq;
public const char UYG_UN_EE_B = '\uFBE6'; //Bax;
public const char UYG_UN_EE_O = '\uFBE7'; //Ottura;
//I
public const char UYG_UN_I_6 = '\u0649'; //Yalghuz;
public const char UYG_UN_I_Y = '\uFEEF'; //Yalghuz;
public const char UYG_UN_I_A = '\uFEF0'; //Ayaq;
public const char UYG_UN_I_B = '\uFBE8'; //Bax;
public const char UYG_UN_I_O = '\uFBE9'; //Ottura;
//Y
public const char UYG_UN_Y_6 = '\u064A'; //Yalghuz;
public const char UYG_UN_Y_Y = '\uFEF1'; //Yalghuz;
public const char UYG_UN_Y_A = '\uFEF2'; //Ayaq;
public const char UYG_UN_Y_B = '\uFEF3'; //Bax;
public const char UYG_UN_Y_O = '\uFEF4'; //Ottura;
//La
public const char UYG_UN_LA_6 = '\uFEFB'; //Yalghuz;
public const char UYG_UN_LA_Y = '\uFEFB'; //Yalghuz;
public const char UYG_UN_LA_A = '\uFEFC'; //Ayaq;
//Amza
public const char UYG_UN_HM_6 = '\u0626'; //Yalghuz;
public const char UYG_UN_HM_Y = '\uFE8B'; //Yalghuz;
public const char UYG_UN_HM_O = '\uFE8C'; //Ottura;
// Towendikiler Uyghurche Heripler
// Biraq ular KeyBord Arqiliq kirguzgende ishlitilmidi
//hemze bilen A
public const char UYGE_UN_HA_Y = '\uFBEA'; //Yalghuz;
public const char UYGE_UN_HA_A = '\uFBEB'; //Ayaq;
//hemze bilen E
public const char UYGE_UN_HE_Y = '\uFBEC'; //Yalghuz;
public const char UYGE_UN_HE_A = '\uFBED'; //Ayaq;
//hemze bilen O
public const char UYGE_UN_HO_Y = '\uFBEE'; //Yalghuz;
public const char UYGE_UN_HO_A = '\uFBEF'; //Ayaq;
//hemze bilen U
public const char UYGE_UN_HU_Y = '\uFBF0'; //Yalghuz;
public const char UYGE_UN_HU_A = '\uFBF1'; //Ayaq;
//hemze bilen OO
public const char UYGE_UN_HOO_Y = '\uFBF2'; //Yalghuz;
public const char UYGE_UN_HOO_A = '\uFBF3'; //Ayaq;
//hemze bilen UU
public const char UYGE_UN_HUU_Y = '\uFBF4'; //Yalghuz;
public const char UYGE_UN_HUU_A = '\uFBF5'; //Ayaq;
//hemze bilen EE
public const char UYGE_UN_HEE_Y = '\uFBF6'; //Yalghuz;
public const char UYGE_UN_HEE_A = '\uFBF7'; //Ayaq;
public const char UYGE_UN_HEE_B = '\uFBF8'; //Ayaq;
//hemze bilen I
public const char UYGE_UN_HI_Y = '\uFBF9'; //Yalghuz;
public const char UYGE_UN_HI_A = '\uFBFA'; //Ayaq;
public const char UYGE_UN_HI_B = '\uFBFB'; //Ayaq;
public const char UYG_UN_PESH = '\u060C'; //Pesh
public const char UYG_UN_SOZUSH = '\u0640'; //Sozlerni tengshesh belgisi
public const char UYG_UN_CHEKITPESH = '\u061B'; // Chekitlik Pesh
public const char UYG_UN_CHONG = '\u203A'; // ChongBelgisi
public const char UYG_UN_KICHIK = '\u2039'; // Kichik Belgisi
public const char UYG_UN_SOAL = '\u061F'; // Soal Belgisi
public const char UYG_UN_KOPCHEKIT = '\u2026'; // kop chekit
public const char UYG_UN_SIZIQ = '\u2014'; // Siziq
public const char UYG_UN_SOL_QOSH_TIRNAQ = '\u00AB'; // Qosh Tirnaq<<
public const char UYG_UN_ONG_QOSH_TIRNAQ = '\u00BB'; // Qosh Tirnaq>>
public const char UYG_UN_YULTUZ = '\u066D'; //Yultuz belgisi
public enum YEZIQ { UEY, ULY, USY, YOQ };
public Uyghur()
{
System.Diagnostics.Debug.WriteLine("Keldi");
}
public static String Sozghuch {
get {
return UYG_UN_SOZUSH + "";
}
}
public static string UEYHerpler {
get {
return "ـئابتجخدرزسشغفقكلمنوىيپچژڭگھۆۇۈۋېەلا";
}
}
public static string ULYHerpler {
get {
return "ABCDEFGHIJKLMNOPQRSTUWXYZÉÖÜabcdefghijklmnopqrstuwxyzéöü’'";
}
}
public static string USYHerpler {
get {
return "АБВГДЕЖЗИЙКЛМНОПРСТУФХЧШҒҖҚҢҮҺӘӨабвгдежзийклмнопрстуфхчшғҗқңүһәөъ’'";
}
}
public static string ULYJumleChongYaz(string newtext)
{
string qur;
Regex jumle = new Regex(@"([\.\?!][\'\""\u2018\u2019\u201c\u201d\)\]]*\s*(?<!\w\.\w.)(?<![A-ZÉÖÜ][a-z][a-z]\.)(?<![A-ZÉÖÜ][a-z]\.)(?<![A-ZÉÖÜ]\.)\s+)", RegexOptions.Compiled);
string[] sp = { "\r\n" };
string[] qurlar = newtext.Replace("uyghur", "Uyghur").Replace("amérik", "Amérik").Split(sp, StringSplitOptions.None);
for (int i = 0; i < qurlar.Length; i++) {
if (qurlar[i].Length > 0) {
qur = qurlar[i];
int stind = 0;
Match match = jumle.Match(qur, stind);
char herp;
while (match.Success) {
stind = match.Index;
herp = qur[stind];
while (Uyghur.ULYHerpler.IndexOf(herp) == -1) {
stind++;
if (stind >= qur.Length) {
break;
}
herp = qur[stind];
}
if (stind < qur.Length) {
qur = qur.Remove(stind, 1).Insert(stind, char.ToUpper(herp).ToString());
}
match = jumle.Match(qur, stind);
}
stind = 0;
herp = qur[stind];
while (Uyghur.ULYHerpler.IndexOf(herp) == -1) {
stind++;
if (stind >= qur.Length) {
break;
}
herp = qur[stind];
}
if (stind < qur.Length && char.IsLower(qur[stind])) {
qur = qur.Remove(stind, 1).Insert(stind, char.ToUpper(herp).ToString());
}
qurlar[i] = qur;
}
}
return string.Join(sp[0], qurlar);
}
public static string USYJumleChongYaz(string newtext)
{
string qur;
Regex jumle = new Regex(@"([\.\?!][\'\""\u2018\u2019\u201c\u201d\)\]]*\s*(?<!\w\.\w.)(?<![АБВГДЕЖЗИЙКЛМНОПРСТУФХЧШҒҖҚҢҮҺӘӨ][абвгдежзийклмнопрстуфхчшғҗқңүһәө][абвгдежзийклмнопрстуфхчшғҗқңүһәө]\.)(?<![АБВГДЕЖЗИЙКЛМНОПРСТУФХЧШҒҖҚҢҮҺӘӨ][абвгдежзийклмнопрстуфхчшғҗқңүһәө]\.)(?<![АБВГДЕЖЗИЙКЛМНОПРСТУФХЧШҒҖҚҢҮҺӘӨ]\.)\s+)", RegexOptions.Compiled);
string[] sp = { "\r\n" };
string[] qurlar = newtext.Replace("уйғур", "Уйғур").Replace("америк", "Америк").Split(sp, StringSplitOptions.None);
for (int i = 0; i < qurlar.Length; i++) {
if (qurlar[i].Length > 0) {
qur = qurlar[i];
int stind = 0;
Match match = jumle.Match(qur, stind);
char herp;
while (match.Success) {
stind = match.Index;
herp = qur[stind];
while (Uyghur.USYHerpler.IndexOf(herp) == -1) {
stind++;
if (stind >= qur.Length) {
break;
}
herp = qur[stind];
}
if (stind < qur.Length) {
qur = qur.Remove(stind, 1).Insert(stind, char.ToUpper(herp).ToString());
}
match = jumle.Match(qur, stind);
}
stind = 0;
herp = qur[stind];
while (Uyghur.USYHerpler.IndexOf(herp) == -1) {
stind++;
if (stind >= qur.Length) {
break;
}
herp = qur[stind];
}
if (stind < qur.Length && char.IsLower(qur[stind])) {
qur = qur.Remove(stind, 1).Insert(stind, char.ToUpper(herp).ToString());
}
qurlar[i] = qur;
}
}
return string.Join(sp[0], qurlar);
}
public static bool IsUyghurcheHerp(char Herp)
{
bool ret = false;
switch (Herp)
{
case UYG_UN_A_6:
case UYG_UN_E_6:
case UYG_UN_B_6:
case UYG_UN_P_6:
case UYG_UN_T_6:
case UYG_UN_J_6:
case UYG_UN_CH_6:
case UYG_UN_X_6:
case UYG_UN_D_6:
case UYG_UN_R_6:
case UYG_UN_Z_6:
case UYG_UN_ZZ_6:
case UYG_UN_S_6:
case UYG_UN_SH_6:
case UYG_UN_GH_6:
case UYG_UN_F_6:
case UYG_UN_Q_6:
case UYG_UN_K_6:
case UYG_UN_G_6:
case UYG_UN_NG_6:
case UYG_UN_L_6:
case UYG_UN_M_6:
case UYG_UN_N_6:
case UYG_UN_H_6:
case UYG_UN_O_6:
case UYG_UN_U_6:
case UYG_UN_OO_6:
case UYG_UN_UU_6:
case UYG_UN_W_6:
case UYG_UN_EE_6:
case UYG_UN_I_6:
case UYG_UN_Y_6:
case UYG_UN_HM_6:
case UYG_UN_A_Y:
case UYG_UN_A_A:
case UYG_UN_E_Y:
case UYG_UN_E_A:
case UYG_UN_B_Y:
case UYG_UN_B_B:
case UYG_UN_B_O:
case UYG_UN_B_A:
case UYG_UN_P_Y:
case UYG_UN_P_B:
case UYG_UN_P_O:
case UYG_UN_P_A:
case UYG_UN_T_Y:
case UYG_UN_T_B:
case UYG_UN_T_O:
case UYG_UN_T_A:
case UYG_UN_J_Y:
case UYG_UN_J_B:
case UYG_UN_J_O:
case UYG_UN_J_A:
case UYG_UN_CH_Y:
case UYG_UN_CH_B:
case UYG_UN_CH_O:
case UYG_UN_CH_A:
case UYG_UN_X_Y:
case UYG_UN_X_B:
case UYG_UN_X_O:
case UYG_UN_X_A:
case UYG_UN_D_Y:
case UYG_UN_D_A:
case UYG_UN_R_Y:
case UYG_UN_R_A:
case UYG_UN_Z_Y:
case UYG_UN_Z_A:
case UYG_UN_ZZ_Y:
case UYG_UN_ZZ_A:
case UYG_UN_S_Y:
case UYG_UN_S_B:
case UYG_UN_S_O:
case UYG_UN_S_A:
case UYG_UN_SH_Y:
case UYG_UN_SH_B:
case UYG_UN_SH_O:
case UYG_UN_SH_A:
case UYG_UN_GH_Y:
case UYG_UN_GH_B:
case UYG_UN_GH_O:
case UYG_UN_GH_A:
case UYG_UN_F_Y:
case UYG_UN_F_B:
case UYG_UN_F_O:
case UYG_UN_F_A:
case UYG_UN_Q_Y:
case UYG_UN_Q_B:
case UYG_UN_Q_O:
case UYG_UN_Q_A:
case UYG_UN_K_Y:
case UYG_UN_K_B:
case UYG_UN_K_O:
case UYG_UN_K_A:
case UYG_UN_G_Y:
case UYG_UN_G_B:
case UYG_UN_G_O:
case UYG_UN_G_A:
case UYG_UN_NG_Y:
case UYG_UN_NG_B:
case UYG_UN_NG_O:
case UYG_UN_NG_A:
case UYG_UN_L_Y:
case UYG_UN_L_B:
case UYG_UN_L_O:
case UYG_UN_L_A:
case UYG_UN_M_Y:
case UYG_UN_M_B:
case UYG_UN_M_O:
case UYG_UN_M_A:
case UYG_UN_N_Y:
case UYG_UN_N_B:
case UYG_UN_N_O:
case UYG_UN_N_A:
case UYG_UN_H_Y:
case UYG_UN_H_A:
case UYG_UN_H_B:
case UYG_UN_H_O:
//case UYGE_UN_H_Y: // Yulghunda Ishlitilgen
//case UYGE_UN_H_A: // Yulghunda ishlitilgen
case UYG_UN_O_Y:
case UYG_UN_O_A:
case UYG_UN_U_Y:
case UYG_UN_U_A:
case UYG_UN_OO_Y:
case UYG_UN_OO_A:
case UYG_UN_UU_Y:
case UYG_UN_UU_A:
case UYG_UN_W_Y:
case UYG_UN_W_A:
case UYG_UN_EE_Y:
case UYG_UN_EE_B:
case UYG_UN_EE_O:
case UYG_UN_EE_A:
case UYG_UN_I_Y:
case UYG_UN_I_B:
case UYG_UN_I_O:
case UYG_UN_I_A:
case UYG_UN_Y_Y:
case UYG_UN_Y_B:
case UYG_UN_Y_O:
case UYG_UN_Y_A:
case UYG_UN_LA_Y:
case UYG_UN_LA_A:
case UYG_UN_HM_Y:
case UYG_UN_HM_O:
ret = true;
break;
default:
ret = false;
break;
}
return ret;
}
public static bool IsUSozuq(char Herp)
{
bool ret = false;
switch (Herp)
{
case UYG_UN_A_6:
case UYG_UN_E_6:
case UYG_UN_O_6:
case UYG_UN_U_6:
case UYG_UN_OO_6:
case UYG_UN_UU_6:
case UYG_UN_EE_6:
case UYG_UN_I_6:
ret = true;
break;
default:
ret = false;
break;
}
return ret;
}
public static bool IsSozuq(char Herp)
{
bool ret = false;
switch (Herp)
{
case UYG_UN_A_6:
case UYG_UN_E_6:
case UYG_UN_O_6:
case UYG_UN_U_6:
case UYG_UN_OO_6:
case UYG_UN_UU_6:
case UYG_UN_EE_6:
case UYG_UN_I_6:
case 'a':
case 'e':
case 'o':
case 'u':
case 'i':
case 'ö':
case 'ü':
case 'é':
case 'а':
case 'ә':
case 'о':
case 'у':
case 'и':
case 'ө':
case 'ү':
case 'е':
ret = true;
break;
default:
ret = false;
break;
}
return ret;
}
public static int GetUnicodeIndex(char Herp)
{
int ret = -1;
switch (Herp)
{
case UYG_UN_A_6:
case UYG_UN_A_Y:
case UYG_UN_A_A:
ret = UYGIN_A;
break;
case UYG_UN_E_6:
case UYG_UN_E_Y:
case UYG_UN_E_A:
ret = UYGIN_E;
break;
case UYG_UN_B_6:
case UYG_UN_B_Y:
case UYG_UN_B_B:
case UYG_UN_B_O:
case UYG_UN_B_A:
ret = UYGIN_B;
break;
case UYG_UN_P_6:
case UYG_UN_P_Y:
case UYG_UN_P_B:
case UYG_UN_P_O:
case UYG_UN_P_A:
ret = UYGIN_P;
break;
case UYG_UN_T_6:
case UYG_UN_T_Y:
case UYG_UN_T_B:
case UYG_UN_T_O:
case UYG_UN_T_A:
ret = UYGIN_T;
break;
case UYG_UN_J_6:
case UYG_UN_J_Y:
case UYG_UN_J_B:
case UYG_UN_J_O:
case UYG_UN_J_A:
ret = UYGIN_J;
break;
case UYG_UN_CH_6:
case UYG_UN_CH_Y:
case UYG_UN_CH_B:
case UYG_UN_CH_O:
case UYG_UN_CH_A:
ret = UYGIN_CH;
break;
case UYG_UN_X_6:
case UYG_UN_X_Y:
case UYG_UN_X_B:
case UYG_UN_X_O:
case UYG_UN_X_A:
ret = UYGIN_X;
break;
case UYG_UN_D_6:
case UYG_UN_D_Y:
case UYG_UN_D_A:
ret = UYGIN_D;
break;
case UYG_UN_R_6:
case UYG_UN_R_Y:
case UYG_UN_R_A:
ret = UYGIN_R;
break;
case UYG_UN_Z_6:
case UYG_UN_Z_Y:
case UYG_UN_Z_A:
ret = UYGIN_Z;
break;
case UYG_UN_ZZ_6:
case UYG_UN_ZZ_Y:
case UYG_UN_ZZ_A:
ret = UYGIN_ZZ;
break;
case UYG_UN_S_6:
case UYG_UN_S_Y:
case UYG_UN_S_B:
case UYG_UN_S_O:
case UYG_UN_S_A:
ret = UYGIN_S;
break;
case UYG_UN_SH_6:
case UYG_UN_SH_Y:
case UYG_UN_SH_B:
case UYG_UN_SH_O:
case UYG_UN_SH_A:
ret = UYGIN_SH;
break;
case UYG_UN_GH_6:
case UYG_UN_GH_Y:
case UYG_UN_GH_B:
case UYG_UN_GH_O:
case UYG_UN_GH_A:
ret = UYGIN_GH;
break;
case UYG_UN_F_6:
case UYG_UN_F_Y:
case UYG_UN_F_B:
case UYG_UN_F_O:
case UYG_UN_F_A:
ret = UYGIN_F;
break;
case UYG_UN_Q_6:
case UYG_UN_Q_Y:
case UYG_UN_Q_B:
case UYG_UN_Q_O:
case UYG_UN_Q_A:
ret = UYGIN_Q;
break;
case UYG_UN_K_6:
case UYG_UN_K_Y:
case UYG_UN_K_B:
case UYG_UN_K_O:
case UYG_UN_K_A:
ret = UYGIN_K;
break;
case UYG_UN_G_6:
case UYG_UN_G_Y:
case UYG_UN_G_B:
case UYG_UN_G_O:
case UYG_UN_G_A:
ret = UYGIN_G;
break;
case UYG_UN_NG_6:
case UYG_UN_NG_Y:
case UYG_UN_NG_B:
case UYG_UN_NG_O:
case UYG_UN_NG_A:
ret = UYGIN_NG;
break;
case UYG_UN_L_6:
case UYG_UN_L_Y:
case UYG_UN_L_B:
case UYG_UN_L_O:
case UYG_UN_L_A:
ret = UYGIN_L;
break;
case UYG_UN_M_6:
case UYG_UN_M_Y:
case UYG_UN_M_B:
case UYG_UN_M_O:
case UYG_UN_M_A:
ret = UYGIN_M;
break;
case UYG_UN_N_6:
case UYG_UN_N_Y:
case UYG_UN_N_B:
case UYG_UN_N_O:
case UYG_UN_N_A:
ret = UYGIN_N;
break;
case UYG_UN_H_6:
case UYG_UN_H_Y:
case UYG_UN_H_A:
case UYG_UN_H_B:
case UYG_UN_H_O:
//case UYGE_UN_H_Y: // Yulghunda Ishlitilgen
//case UYGE_UN_H_A: // Yulghunda ishlitilgen
ret = UYGIN_H;
break;
case UYG_UN_O_6:
case UYG_UN_O_Y:
case UYG_UN_O_A:
ret = UYGIN_O;
break;
case UYG_UN_U_6:
case UYG_UN_U_Y:
case UYG_UN_U_A:
ret = UYGIN_U;
break;
case UYG_UN_OO_6:
case UYG_UN_OO_Y:
case UYG_UN_OO_A:
ret = UYGIN_OO;
break;
case UYG_UN_UU_6:
case UYG_UN_UU_Y:
case UYG_UN_UU_A:
ret = UYGIN_UU;
break;
case UYG_UN_W_6:
case UYG_UN_W_Y:
case UYG_UN_W_A:
ret = UYGIN_W;
break;
case UYG_UN_EE_6:
case UYG_UN_EE_Y:
case UYG_UN_EE_B:
case UYG_UN_EE_O:
case UYG_UN_EE_A:
ret = UYGIN_EE;
break;
case UYG_UN_I_6:
case UYG_UN_I_Y:
case UYG_UN_I_B:
case UYG_UN_I_O:
case UYG_UN_I_A:
ret = UYGIN_I;
break;
case UYG_UN_Y_6:
case UYG_UN_Y_Y:
case UYG_UN_Y_B:
case UYG_UN_Y_O:
case UYG_UN_Y_A:
ret = UYGIN_Y;
break;
case UYG_UN_LA_Y:
case UYG_UN_LA_A:
ret = UYGIN_LA;
break;
case UYG_UN_HM_6:
case UYG_UN_HM_Y:
case UYG_UN_HM_O:
ret = UYGIN_HM;
break;
default:
break;
}
return ret;
}
public static String UEY2ULY(String uyghurkona)
{
// int stopChange=0;
StringBuilder token = new StringBuilder();
StringBuilder unicode = new StringBuilder();
int len = 0;
int pos = 0;
uyghurkona = uyghurkona.Replace(Uyghur.Sozghuch, "");
int size = uyghurkona.Length;
if (size == 0) return "";
char Herp;
while (pos < size)
{
Herp = uyghurkona[pos];
// if(Herp=='<')
// {
// stopChange++;
// unicode.Append(Herp);
// pos++;
// continue;
// }
// else if(Herp=='>')
// {
// stopChange--;
// if(stopChange<0)stopChange=0;
// unicode.Append(Herp);
// pos++;
// continue;
// }
//
// if(stopChange!=0)
// {
// unicode.Append(Herp);
// pos++;
// continue;
// }
if (IsUyghurcheHerp(Herp) == true || Herp == '&')
{
token.Length = 0;
if (IsUyghurcheHerp(Herp) == true)
{
while (IsUyghurcheHerp(Herp) == true)
{
token.Append(Herp);
pos++;
if (pos >= size) break;
Herp = uyghurkona[pos];
}
}
else
{
while (Herp != ';' && Herp != '<' && Herp != '>' && Herp != ' ' && Herp != '\n' && Herp != '\r')
{
if (Herp >= ' ' && Herp <= '~')
{
token.Append(Herp);
pos++;
if (pos >= size) break;
Herp = uyghurkona[pos];
}
else
{
break;
}
}
if (Herp == ';') {
token.Append(Herp);
pos++;
}
}
len = token.Length;
if (len > 0)
{
if (IsConstanToken(token) == true)
{
unicode.Append(U2LSBelge(token.ToString()));
}
else
{
unicode.Append(U2L(token));
}
}
}
else
{
unicode.Append(U2LSBelge(Herp + ""));
pos++;
}
}
return unicode.ToString();
}
public static String UEY2USY(String uyghurkona)
{
// int stopChange=0;
StringBuilder token = new StringBuilder();
StringBuilder unicode = new StringBuilder();
int len = 0;
int pos = 0;
uyghurkona = uyghurkona.Replace(Uyghur.Sozghuch, "");
int size = uyghurkona.Length;
if (size == 0) return "";
char Herp;
while (pos < size)
{
Herp = uyghurkona[pos];
// if(Herp=='<')
// {
// stopChange++;
// unicode.Append(Herp);
// pos++;
// continue;
// }
// else if(Herp=='>')
// {
// stopChange--;
// if(stopChange<0)stopChange=0;
// unicode.Append(Herp);
// pos++;
// continue;
// }
//
// if(stopChange!=0)
// {
// unicode.Append(Herp);
// pos++;
// continue;
// }
if (IsUyghurcheHerp(Herp) == true || Herp == '&')
{
token.Length = 0;
if (IsUyghurcheHerp(Herp) == true)
{
while (IsUyghurcheHerp(Herp) == true)
{