-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathExampleFunctions.cs
104 lines (90 loc) · 3.34 KB
/
ExampleFunctions.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
namespace Wacton.Desu.ExampleConsole
{
using System.Collections.Generic;
using Wacton.Desu.Japanese;
using Wacton.Desu.Kanji;
using Wacton.Desu.Names;
using Wacton.Desu.Radicals;
using Wacton.Desu.Romaji;
using Wacton.Desu.Strokes;
public static class ExampleFunctions
{
public static IEnumerable<IJapaneseEntry> GetJapaneseEntries()
{
var japaneseDictionary = new JapaneseDictionary();
var japaneseEntries = japaneseDictionary.GetEntries();
return japaneseEntries;
}
public static IEnumerable<IJapaneseEntry> ParseJapaneseEntries()
{
var japaneseEntries = JapaneseDictionary.ParseEntries();
return japaneseEntries;
}
public static IEnumerable<INameEntry> GetNameEntries()
{
var nameDictionary = new NameDictionary();
var nameEntries = nameDictionary.GetEntries();
return nameEntries;
}
public static IEnumerable<INameEntry> ParseNameEntries()
{
var nameEntries = NameDictionary.ParseEntries();
return nameEntries;
}
public static IEnumerable<IKanjiEntry> GetKanjiEntries()
{
var kanjiDictionary = new KanjiDictionary();
var kanjiEntries = kanjiDictionary.GetEntries();
return kanjiEntries;
}
public static IEnumerable<IKanjiEntry> ParseKanjiEntries()
{
var kanjiEntries = KanjiDictionary.ParseEntries();
return kanjiEntries;
}
public static IDictionary<string, IEnumerable<string>> GetKanjiToRadicals()
{
var radicalLookup = new RadicalLookup();
var kanjiToRadicals = radicalLookup.GetKanjiToRadicals();
return kanjiToRadicals;
}
public static IDictionary<string, IEnumerable<string>> ParseKanjiToRadicals()
{
var kanjiToRadicals = RadicalLookup.ParseKanjiToRadicals();
return kanjiToRadicals;
}
public static IDictionary<string, IEnumerable<string>> GetRadicalToKanjis()
{
var radicalLookup = new RadicalLookup();
var radicalToKanjis = radicalLookup.GetRadicalToKanjis();
return radicalToKanjis;
}
public static IDictionary<string, IEnumerable<string>> ParseRadicalToKanjis()
{
var radicalToKanjis = RadicalLookup.ParseRadicalToKanjis();
return radicalToKanjis;
}
public static IDictionary<string, IEnumerable<string>> GetKanjiToStrokes()
{
var strokeLookup = new StrokeLookup();
var kanjiToStrokes = strokeLookup.GetKanjiToStrokes();
return kanjiToStrokes;
}
public static IDictionary<string, IEnumerable<string>> ParseKanjiToStrokes()
{
var kanjiToStrokes = StrokeLookup.ParseKanjiToStrokes();
return kanjiToStrokes;
}
public static string GetRomaji()
{
var transliterator = new Transliterator();
var romaji = transliterator.GetRomaji("です"); // romaji == "desu"
return romaji;
}
public static string ToRomaji()
{
var romaji = Transliterator.ToRomaji("です"); // romaji == "desu"
return romaji;
}
}
}