This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Emmi.cs
executable file
·74 lines (63 loc) · 1.96 KB
/
Emmi.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
using System;
namespace Dialector
{
/// <summary>
/// Summary description for Emmi.
/// </summary>
public class Emmi : Dialect
{
private Util u;
public Emmi()
{
u = new Util();
}
#region Dialect Members
public string getDialect(string Text)
{
string word = "";
string s = "";
bool tagClose = true;
for (int n = 0; n < Text.Length; n++)
{
string cur = Text.Substring(n, 1);
switch (cur)
{
case "<": tagClose = false; break;
case ">": tagClose = true; break;
}
if (cur == " ")
{
if (tagClose) replace(ref word);
s += " " + word;
word = "";
}
else
{
word += cur;
}
}
return s;
}
private void replace(ref string s)
{
s = s.Replace(" k", " g");
s = s.Replace(" K", " G");
s = u.replaceTextFirstCapital(s, "k", "h");
u.replaceText(ref s, "ý", "u", false, true);
u.replaceText(ref s, "I", "U", false, true);
u.replaceText(ref s, "i", "ü", false, true);
u.replaceText(ref s, "Ý", "Ü", false, true);
u.replaceText(ref s, "p", "b", true, false);
u.replaceText(ref s, "P", "B", true, false);
u.replaceText(ref s, "s", "z", true, false);
u.replaceText(ref s, "S", "Z", true, false);
u.replaceText(ref s, "t", "d", true, false);
u.replaceText(ref s, "T", "D", true, false);
s = s.Replace("eðe", "ee");
s = s.Replace("iði", "ii");
s = s.Replace("iyor", "üür");
s = u.replaceTextFirstCapital(s, "hiç", "heç");
}
#endregion
}
}