Imports Microsoft.VisualBasic
Imports System.Collections.Generic
Public Module StackOverflowChallenge001
Private sample1 As String = "Then the two animals stood and regarded each other cautiously." & vbCrLf &
"""Hullo, Mole!"" said the Water Rat." & vbCrLf &
"""Hullo, Rat!"" said the Mole." & vbCrLf &
"""Would you like to come over?"" enquired the Rat presently." & vbCrLf &
"""Oh, it's all very well to talk,"" said the Mole rather pettishly, he being New to a river And riverside life And its ways." & vbCrLf &
"""This has been a wonderful day!"" said he, as the Rat shoved off And took to the sculls again. " &
"""Do you know, I've never been in a boat before in all my life."""
Private sample2 As String = "Once upon a time there were four little Rabbits, And their names were—" & vbCrLf &
"Cotton-tail," & vbCrLf &
"They lived With their Mother In a sand-bank, underneath the root Of a very big fir-tree." & vbCrLf &
"'Now my dears,' said old Mrs. Rabbit one morning, 'you may go into the fields or down the lane, but don't go into Mr. McGregor's garden: " &
"your Father had an accident there; he was put In a pie by Mrs. McGregor.'" & vbCrLf &
"'Now run along, and don't get into mischief. I am going out.'"
Private samples As String() = {sample1, sample2}
Dim replacements As New Dictionary(Of String, String) From {{"Rat", "Mousey"},
{"shoved off", "went bye-bye"},
{"dears", "wittle wones"},
{"don't", "it's a big no-no"}}
For Each sample As String In samples
For Each kvp As KeyValuePair(Of String, String) In replacements
sample = sample.Replace(kvp.Key, kvp.Value)
Console.WriteLine("Baby talk version:")
Console.WriteLine(sample & vbCrLf)