Line | |
---|
1 | namespace HeuristicLab.BenchmarkSuite.Problems {
|
---|
2 | using HeuristicLab.BenchmarkSuite.ProblemData;
|
---|
3 |
|
---|
4 | public class PigLatin : BenchmarkSuiteDataDescriptor<string, string> {
|
---|
5 | private const string displayMame = "Pig Latin";
|
---|
6 | private const string description = "Given a string containing lowercase words separated by single spaces, print the string with each word translated to pig Latin.Specifically, if a word starts with a vowel, it should have“ay”added to its end; otherwise, the first letter is moved to the end of the word, followed by “ay”";
|
---|
7 |
|
---|
8 | public override string Name { get { return displayMame; } }
|
---|
9 | public override string Description { get { return description; } }
|
---|
10 | protected override int InputCount { get { return 1; } }
|
---|
11 | protected override int OutputCount { get { return 1; } }
|
---|
12 |
|
---|
13 | public override string ConvertInput(string[] input) {
|
---|
14 | return input[0];
|
---|
15 | }
|
---|
16 |
|
---|
17 | public override string ConvertOutput(string[] output) {
|
---|
18 | return output[0];
|
---|
19 | }
|
---|
20 |
|
---|
21 | public override IPushData CreatePushData(Example<string, string>[] training, Example<string, string>[] test) {
|
---|
22 | return new PigLatinPushData(training, test);
|
---|
23 | }
|
---|
24 | }
|
---|
25 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.