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 |
/* Eggy Peggy Language is a secret language rather like Pig Latin or Cockney Rhyming slang. It takes a while to master, but was once used, in particular, by schoolgirls to talk privately when there was a chance of being overheard by outsiders, and it could be spoken and understood very rapidly, but was unintelligible to the untrained ear. In essence, the string 'egg' is inserted before every vowel. There are dialects of Eggy Peggy language and the same sort of idea is used in Pig Latin, Jeringozo, Verlan, and Ubbi Dubbi. Here is a simple translator into Eggy Peggy language, using a device which came to me almost by accident. You will realise, of course that the system can be used for all sorts of serious programming applications, including macro processing. I've kept things simple just to show the principle, but of course I've ignored the problems of processing words with capital letters. We'd also need a back-translator or decoder. I'd be interested to see these. What about a Pig Latin Translator? */ DECLARE @SampleParagraph VARCHAR(8000); SELECT @SampleParagraph = '"One must clearly state that the assessment of any significant weaknesses in the central monologism of ODBC cannot be shown to be relevant. This has to be considered in contrast to the apprehension of the deterministic aspect" Dean Carson in The Journal Of The Collaborative Integrated Transposition (1997) '; DECLARE @EggyPeggy TABLE ( vowel CHAR(1), replacement VARCHAR(4), theorder INT ); INSERT INTO @EggyPeggy (vowel, replacement, theorder) SELECT f.vowel, f.Replacement, f.theorder FROM (VALUES ('e', 'egge', 1), ('a', 'egga', 2), ('i', 'eggi', 3), ('o', 'eggo', 4), ('u', 'eggu', 5), ('E', 'Egge', 6), ('A', 'Egga', 7), ('I', 'Eggi', 8), ('O', 'Eggo', 9), ('U', 'Eggu', 10) ) f(vowel, Replacement, theorder); SELECT @SampleParagraph = REPLACE( @SampleParagraph COLLATE Latin1_General_CS_AS, [@EggyPeggy].vowel COLLATE Latin1_General_CS_AS, [@EggyPeggy].replacement COLLATE Latin1_General_CS_AS ) FROM @EggyPeggy WHERE CHARINDEX([@EggyPeggy].vowel, @SampleParagraph) > 0 ORDER BY [@EggyPeggy].theorder; SELECT @SampleParagraph; --"Eggonegge meggust cleggeeggarly steggategge theggat thegge eggasseggessmeggent eggof eggany seggigneggifeggiceggant weggeeggakneggessegges eggin thegge ceggentreggal meggoneggoleggogeggism eggof EggoDBC cegganneggot begge sheggown teggo begge reggeleggeve |
Load comments