Translate English to Corpus












14














The Corpus are a fictional faction from the popular video game Warframe who have a somewhat interesting language.



Whilst other factions in the game such as the Grineer have some logic behind their language, the Corpus is simply a lossy substitution of the English language.



All Corpus words are the same as their English counterparts, except with the following alphabetical mappings:



English to Corpus mapping



This causes some problems with pronunciation as:



yes becomes yey
say becomes yay
yay becomes yay
sassy becomes yayyy
case becomes yaye



Here's a text version of the mappings:



a -> a
b -> t
c -> y
d -> p
e -> e
f -> t
g -> j
h -> k
i -> i
j -> t
k -> k
l -> p
m -> s
n -> t
o -> o
p -> k
q -> r
r -> t
s -> y
t -> p
u -> u
v -> t
w -> j
x -> k
y -> y
z -> b


The challenge



Given text using the English alphabet, output its Corpus translation.



For example, the text Hello, World! becomes Keppo, Jotpp! in Corpus



The Rules




  • Input will only consist of ASCII printable characters

  • Input text may contain whitespace and punctuation, these must be preserved

  • Capitalization of letters must be preserved

  • This is code-golf so naturally, fewest bytes wins!


The Testcases



Test cases are separated with <===========>, with a blank line between input and expected output



Hello, World!

Keppo, Jotpp!
<===========>
Yes

Yey
<===========>
TestcaSe

PeypyaYe
<===========>
Programming Puzzles and Code Golf

Ktojtassitj Kubbpey atp Yope Jopt
<===========>
This text has a
newline in it

Pkiy pekp kay a
tejpite it ip
<===========>
Corpus language best language

Yotkuy patjuaje teyp patjuaje
<===========>
Strip the flesh! Salt the wounds!

Yptik pke tpeyk! Yapp pke joutpy!
<===========>
"Install Warframe" they said, "It'll be fun" they said

"Itypapp Jatttase" pkey yaip, "Ip'pp te tut" pkey yaip
<===========>
What the **** did you just ****ing say about me, you little *****?
I'll have you know I graduated top of my class in the Navy Seals,
and I've been involved in numerous secret raids on Al-Quaeda,
and I have over 300 confirmed kills.

Jkap pke **** pip you tuyp ****itj yay atoup se, you pipppe *****?
I'pp kate you ktoj I jtapuapep pok ot sy ypayy it pke Taty Yeapy,
atp I'te teet ittoptep it tusetouy yeytep taipy ot Ap-Ruaepa,
atp I kate otet 300 yottitsep kippy.


The Bonus



If you also include an audio recording (or video with audio) of you pronouncing each of the testcase's Corpus translations, you may multiply your bytecount by 1 as a reward.










share|improve this question
























  • @Shaggy Sure, shoulda thought of that
    – Skidsdev
    Dec 20 at 19:25






  • 4




    @RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
    – Skidsdev
    Dec 20 at 19:38










  • Can output be an array of characters?
    – ElPedro
    Dec 20 at 21:23










  • @Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
    – guest271314
    Dec 20 at 22:19












  • @ngn oops my bad, copied from reddit :P
    – Skidsdev
    Dec 21 at 13:44
















14














The Corpus are a fictional faction from the popular video game Warframe who have a somewhat interesting language.



Whilst other factions in the game such as the Grineer have some logic behind their language, the Corpus is simply a lossy substitution of the English language.



All Corpus words are the same as their English counterparts, except with the following alphabetical mappings:



English to Corpus mapping



This causes some problems with pronunciation as:



yes becomes yey
say becomes yay
yay becomes yay
sassy becomes yayyy
case becomes yaye



Here's a text version of the mappings:



a -> a
b -> t
c -> y
d -> p
e -> e
f -> t
g -> j
h -> k
i -> i
j -> t
k -> k
l -> p
m -> s
n -> t
o -> o
p -> k
q -> r
r -> t
s -> y
t -> p
u -> u
v -> t
w -> j
x -> k
y -> y
z -> b


The challenge



Given text using the English alphabet, output its Corpus translation.



For example, the text Hello, World! becomes Keppo, Jotpp! in Corpus



The Rules




  • Input will only consist of ASCII printable characters

  • Input text may contain whitespace and punctuation, these must be preserved

  • Capitalization of letters must be preserved

  • This is code-golf so naturally, fewest bytes wins!


The Testcases



Test cases are separated with <===========>, with a blank line between input and expected output



Hello, World!

Keppo, Jotpp!
<===========>
Yes

Yey
<===========>
TestcaSe

PeypyaYe
<===========>
Programming Puzzles and Code Golf

Ktojtassitj Kubbpey atp Yope Jopt
<===========>
This text has a
newline in it

Pkiy pekp kay a
tejpite it ip
<===========>
Corpus language best language

Yotkuy patjuaje teyp patjuaje
<===========>
Strip the flesh! Salt the wounds!

Yptik pke tpeyk! Yapp pke joutpy!
<===========>
"Install Warframe" they said, "It'll be fun" they said

"Itypapp Jatttase" pkey yaip, "Ip'pp te tut" pkey yaip
<===========>
What the **** did you just ****ing say about me, you little *****?
I'll have you know I graduated top of my class in the Navy Seals,
and I've been involved in numerous secret raids on Al-Quaeda,
and I have over 300 confirmed kills.

Jkap pke **** pip you tuyp ****itj yay atoup se, you pipppe *****?
I'pp kate you ktoj I jtapuapep pok ot sy ypayy it pke Taty Yeapy,
atp I'te teet ittoptep it tusetouy yeytep taipy ot Ap-Ruaepa,
atp I kate otet 300 yottitsep kippy.


The Bonus



If you also include an audio recording (or video with audio) of you pronouncing each of the testcase's Corpus translations, you may multiply your bytecount by 1 as a reward.










share|improve this question
























  • @Shaggy Sure, shoulda thought of that
    – Skidsdev
    Dec 20 at 19:25






  • 4




    @RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
    – Skidsdev
    Dec 20 at 19:38










  • Can output be an array of characters?
    – ElPedro
    Dec 20 at 21:23










  • @Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
    – guest271314
    Dec 20 at 22:19












  • @ngn oops my bad, copied from reddit :P
    – Skidsdev
    Dec 21 at 13:44














14












14








14


1





The Corpus are a fictional faction from the popular video game Warframe who have a somewhat interesting language.



Whilst other factions in the game such as the Grineer have some logic behind their language, the Corpus is simply a lossy substitution of the English language.



All Corpus words are the same as their English counterparts, except with the following alphabetical mappings:



English to Corpus mapping



This causes some problems with pronunciation as:



yes becomes yey
say becomes yay
yay becomes yay
sassy becomes yayyy
case becomes yaye



Here's a text version of the mappings:



a -> a
b -> t
c -> y
d -> p
e -> e
f -> t
g -> j
h -> k
i -> i
j -> t
k -> k
l -> p
m -> s
n -> t
o -> o
p -> k
q -> r
r -> t
s -> y
t -> p
u -> u
v -> t
w -> j
x -> k
y -> y
z -> b


The challenge



Given text using the English alphabet, output its Corpus translation.



For example, the text Hello, World! becomes Keppo, Jotpp! in Corpus



The Rules




  • Input will only consist of ASCII printable characters

  • Input text may contain whitespace and punctuation, these must be preserved

  • Capitalization of letters must be preserved

  • This is code-golf so naturally, fewest bytes wins!


The Testcases



Test cases are separated with <===========>, with a blank line between input and expected output



Hello, World!

Keppo, Jotpp!
<===========>
Yes

Yey
<===========>
TestcaSe

PeypyaYe
<===========>
Programming Puzzles and Code Golf

Ktojtassitj Kubbpey atp Yope Jopt
<===========>
This text has a
newline in it

Pkiy pekp kay a
tejpite it ip
<===========>
Corpus language best language

Yotkuy patjuaje teyp patjuaje
<===========>
Strip the flesh! Salt the wounds!

Yptik pke tpeyk! Yapp pke joutpy!
<===========>
"Install Warframe" they said, "It'll be fun" they said

"Itypapp Jatttase" pkey yaip, "Ip'pp te tut" pkey yaip
<===========>
What the **** did you just ****ing say about me, you little *****?
I'll have you know I graduated top of my class in the Navy Seals,
and I've been involved in numerous secret raids on Al-Quaeda,
and I have over 300 confirmed kills.

Jkap pke **** pip you tuyp ****itj yay atoup se, you pipppe *****?
I'pp kate you ktoj I jtapuapep pok ot sy ypayy it pke Taty Yeapy,
atp I'te teet ittoptep it tusetouy yeytep taipy ot Ap-Ruaepa,
atp I kate otet 300 yottitsep kippy.


The Bonus



If you also include an audio recording (or video with audio) of you pronouncing each of the testcase's Corpus translations, you may multiply your bytecount by 1 as a reward.










share|improve this question















The Corpus are a fictional faction from the popular video game Warframe who have a somewhat interesting language.



Whilst other factions in the game such as the Grineer have some logic behind their language, the Corpus is simply a lossy substitution of the English language.



All Corpus words are the same as their English counterparts, except with the following alphabetical mappings:



English to Corpus mapping



This causes some problems with pronunciation as:



yes becomes yey
say becomes yay
yay becomes yay
sassy becomes yayyy
case becomes yaye



Here's a text version of the mappings:



a -> a
b -> t
c -> y
d -> p
e -> e
f -> t
g -> j
h -> k
i -> i
j -> t
k -> k
l -> p
m -> s
n -> t
o -> o
p -> k
q -> r
r -> t
s -> y
t -> p
u -> u
v -> t
w -> j
x -> k
y -> y
z -> b


The challenge



Given text using the English alphabet, output its Corpus translation.



For example, the text Hello, World! becomes Keppo, Jotpp! in Corpus



The Rules




  • Input will only consist of ASCII printable characters

  • Input text may contain whitespace and punctuation, these must be preserved

  • Capitalization of letters must be preserved

  • This is code-golf so naturally, fewest bytes wins!


The Testcases



Test cases are separated with <===========>, with a blank line between input and expected output



Hello, World!

Keppo, Jotpp!
<===========>
Yes

Yey
<===========>
TestcaSe

PeypyaYe
<===========>
Programming Puzzles and Code Golf

Ktojtassitj Kubbpey atp Yope Jopt
<===========>
This text has a
newline in it

Pkiy pekp kay a
tejpite it ip
<===========>
Corpus language best language

Yotkuy patjuaje teyp patjuaje
<===========>
Strip the flesh! Salt the wounds!

Yptik pke tpeyk! Yapp pke joutpy!
<===========>
"Install Warframe" they said, "It'll be fun" they said

"Itypapp Jatttase" pkey yaip, "Ip'pp te tut" pkey yaip
<===========>
What the **** did you just ****ing say about me, you little *****?
I'll have you know I graduated top of my class in the Navy Seals,
and I've been involved in numerous secret raids on Al-Quaeda,
and I have over 300 confirmed kills.

Jkap pke **** pip you tuyp ****itj yay atoup se, you pipppe *****?
I'pp kate you ktoj I jtapuapep pok ot sy ypayy it pke Taty Yeapy,
atp I'te teet ittoptep it tusetouy yeytep taipy ot Ap-Ruaepa,
atp I kate otet 300 yottitsep kippy.


The Bonus



If you also include an audio recording (or video with audio) of you pronouncing each of the testcase's Corpus translations, you may multiply your bytecount by 1 as a reward.







code-golf text-processing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 21 at 13:45

























asked Dec 20 at 19:10









Skidsdev

6,3362974




6,3362974












  • @Shaggy Sure, shoulda thought of that
    – Skidsdev
    Dec 20 at 19:25






  • 4




    @RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
    – Skidsdev
    Dec 20 at 19:38










  • Can output be an array of characters?
    – ElPedro
    Dec 20 at 21:23










  • @Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
    – guest271314
    Dec 20 at 22:19












  • @ngn oops my bad, copied from reddit :P
    – Skidsdev
    Dec 21 at 13:44


















  • @Shaggy Sure, shoulda thought of that
    – Skidsdev
    Dec 20 at 19:25






  • 4




    @RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
    – Skidsdev
    Dec 20 at 19:38










  • Can output be an array of characters?
    – ElPedro
    Dec 20 at 21:23










  • @Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
    – guest271314
    Dec 20 at 22:19












  • @ngn oops my bad, copied from reddit :P
    – Skidsdev
    Dec 21 at 13:44
















@Shaggy Sure, shoulda thought of that
– Skidsdev
Dec 20 at 19:25




@Shaggy Sure, shoulda thought of that
– Skidsdev
Dec 20 at 19:25




4




4




@RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
– Skidsdev
Dec 20 at 19:38




@RobertS. it also provides no bonus to your score (x * 1 == x). It's a tongue-in-cheek poke at the unpronouncability of many of the translations
– Skidsdev
Dec 20 at 19:38












Can output be an array of characters?
– ElPedro
Dec 20 at 21:23




Can output be an array of characters?
– ElPedro
Dec 20 at 21:23












@Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
– guest271314
Dec 20 at 22:19






@Skidsdev The "translations" are pronounceable; either as a recorded human voice or programmatically using machine learning and/or text-to-speech technologies.
– guest271314
Dec 20 at 22:19














@ngn oops my bad, copied from reddit :P
– Skidsdev
Dec 21 at 13:44




@ngn oops my bad, copied from reddit :P
– Skidsdev
Dec 21 at 13:44










21 Answers
21






active

oldest

votes


















7















Bash + coreutils, 46





tr b-zB-Z ${a=typetjkitkpstokrtyputjkyb}${a^^}


Try it online!






share|improve this answer





























    4















    05AB1E, 24 bytes



    ži.•ÜÁ©;«ìñä°ÔG·ÖYΘ•Du«‡


    Explanation:



                           ‡   transliterate
    ži a-zA-Z with
    .•ÜÁ©;«ìñä°ÔG·ÖYΘ• atypetjkitkpstokrtyputjkyb
    Du« concatenated with itself, uppercased


    Try it online!






    share|improve this answer























    • Minor 24 bytes alternative by transliterating just the consonants.
      – Kevin Cruijssen
      Dec 22 at 17:29





















    4















    Charcoal, 42 bytes



    ≔”$⌊∧T-¶I^F⁷ü@n⁹γ›7η”η⭆θ⎇№β↧ι§⎇№βι↧ηη⌕β↧ιι


    Try it online! Link is to verbose version of code. Explanation:



    ≔                       Assign
    ”$⌊∧T-¶I^F⁷ü@n⁹γ›7η” Compressed string `ATYPETJKITKPSTOKRTYPUTJKYB`
    η To variable

    θ Input string
    ⭆ Map over characters and join
    ⎇ If
    β Lowercase alphabet
    № Contains
    ι Current character
    ↧ Lowercased
    (Then)
    ⎇ If
    β Lowercase alphabet
    № Contains
    ι Current character
    (Then)
    η Variable
    ↧ Lowercased
    (Else)
    η Variable
    § Indexed by
    ⌕ Index of
    ι Current character
    ↧ Lowercased
    β In lowercase alphabet
    (Else)
    ι Current character
    Implicitly print





    share|improve this answer





























      4














      T-SQL, 107 Bytes



      SELECT TRANSLATE(v,'bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',
      'typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB')FROM t


      Line break and indent are for readability only.



      Uses the SQL 2017 function TRANSLATE for character replacement.



      Unfortunately had to put (almost) the entire alphabet in there twice to maintain casing. There are probably better ways, maybe something that handles the t's as a group, but this worked for me.



      Input is via a pre-existing table t with varchar column v, per our IO rules.



      In this case the table must be created using a case-sensitive collation, either by running on a case-sensitive server, or by using the COLLATE keyword (not counted toward character total):



      CREATE TABLE t(v varchar(999) COLLATE Latin1_General_CS_AS)





      share|improve this answer































        3















        JavaScript (Node.js), 100 bytes





        s=>s.replace(/[a-z]/gi,c=>(C='_atypetjkitkpstokrtyputjkyb'[Buffer(c)[0]&31],c>{}?C:C.toUpperCase()))


        Try it online!



        s =>                                  // s = input string
        s.replace( // replace in s ...
        /[a-z]/gi, // ... all letters, no matter the case
        c => ( // for each letter c:
        C = // pick a replacement letter C
        '_atypetjkitkpstokrtyputjkyb' // from a 1-indexed lookup string
        [Buffer(c)[0] & 31], // using the 5 lowest bits of the ASCII code of c
        c > {} ? // if the original letter was in lower case:
        C // use the replacement letter as-is
        : // else:
        C.toUpperCase() // convert it to upper case
        ) //
        ) // end of replace()





        share|improve this answer































          3















          R, 79 bytes





          function(x)chartr("b-zB-Z",paste0(y<-"typetjkitkpstokrtyputjkyb",toupper(y)),x)


          Try it online!



          Only 3 bytes shorter than literally typing both lower- and uppercase replacement strings together...




          R, 79 bytes





          function(x,`[`=chartr)"B-Z"[toupper(y),"b-z"[y<-"typetjkitkpstokrtyputjkyb",x]]


          Try it online!



          Fancier code, same byte count.






          share|improve this answer































            2















            Perl 5 -p, 54 bytes





            eval"y/B-Zb-z/".uc($a=typetjkitkpstokrtyputjkyb)."$a/"


            Try it online!






            share|improve this answer





























              2















              Ruby, 55 bytes





              $_.tr!"b-zB-Z",(x="typetjkitkpstokrtyputjkyb")+x.upcase


              Try it online!






              share|improve this answer





























                2















                J, 78 61 bytes



                -17 bytes thanks to FrownyFrog!



                rplc(u:,98 66+/i.25);"0(,toupper)@'typetjkitkpstokrtyputjkyb'


                Try it online!






                share|improve this answer



















                • 2




                  61
                  – FrownyFrog
                  Dec 21 at 10:52










                • @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                  – Galen Ivanov
                  Dec 21 at 11:27





















                2















                K (ngn/k), 87 63 61 60 59 57 bytes



                {`c$x-a-@[!128;98+!25;:;"typetjkitkpstokrtyputjkyb"]a:_x}


                Try it online!



                { } function with argument x



                _ to lowercase



                a: assign to a



                !128 the list 0 1 2 ... 127



                @[!128; indices ;:; values ] amend it by replacing the elements at indices with the given values



                98+!25 the list 98 99 100 ... 122 which are the ascii codes for "bcd...z"



                juxtaposition is indexing, so we use a (implicitly converted to integers) as indices in the amended list



                x-a- subtract from a, then subtract form x; this restores upper/lowercase as in the original string



                `c$ convert to characters






                share|improve this answer































                  2















                  C# (Visual C# Interactive Compiler), 151 83 bytes





                  n=>n.Select(a=>char.IsLetter(a)?(char)(" ATYPETJKITKPSTOKRTYPUTJKYB"[a%32]|a&32):a)


                  Try it online!



                  Saved a whopping 68 bytes thanks to Pietu1998!






                  share|improve this answer























                  • You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                    – Pietu1998
                    Dec 21 at 14:01












                  • Thanks! Nice trick with the bit wise operators!
                    – Embodiment of Ignorance
                    Dec 21 at 16:23



















                  1















                  Retina 0.8.2, 59 bytes



                  [a-z]
                  $&
                  T`l`L
                  T`L`ATYPETJKITKPSTOKRTYPUTJKYB
                  T`L `l_` .


                  Try it online! Link includes test cases. Explanation:



                  [a-z]
                  $&


                  Prefix a non-ASCII character to each letter. (I tried to use a non-breaking space but Firefox might have changed it back to a regular space after copying and pasting.)



                  T`l`L


                  Uppercase all of the letters.



                  T`L`ATYPETJKITKPSTOKRTYPUTJKYB


                  Convert the letters to Corpus.



                  T`L `l_` .


                  Lowercase the letters after the non-ASCII character and delete the non-ASCII character.



                  Naïve solution is 63 bytes:



                  T`lL`atypetjkitkpstokrtyputjkybATYPETJKITKPSTOKRTYPUTJKYB


                  Try it online! Link includes test cases.






                  share|improve this answer





























                    1















                    Python 2, 115 bytes





                    lambda i:i.translate(''.join(a))
                    a=map(chr,range(256))
                    b='typetjkitkpstokrtyputjkyb'
                    a[66:91]=b.upper();a[98:123]=b


                    Try it online!



                    Adapted from @ElPedro's answer. This generates the replacement for every ascii character in the array a and then uses str.translate.



                    Can be brought to 113 bytes if returning an array of chars is acceptable:



                    lambda i:[a[ord(x)]for x in i]
                    a=map(chr,range(256))
                    b='typetjkitkpstokrtyputjkyb'
                    a[66:91]=b.upper();a[98:123]=b


                    Try it online!






                    share|improve this answer





















                    • Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                      – ElPedro
                      Dec 20 at 23:38



















                    1















                    Jelly, 29 bytes



                    “qḍỊYl4ḃ©ƭṄxḳ½Dy’ṃⱮØA,Øa¤⁺żẎy


                    Try it online!






                    share|improve this answer





















                    • Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                      – Jonathan Allan
                      Dec 21 at 19:01





















                    1















                    Japt, 37 bytes



                    ;®i`…ypetjkŠkp¡okrtyp©jkyb`pu)gCpu bZ


                    Try it online!



                    The above link includes most test cases, but I haven't been able to input the second to last one as a string because it contains both single and double quotes. Here is that test case, input as an array of characters instead.



                    Explanation:



                    ;                                        #Set C to the lowercase alphabet
                    ® #For each character Z of the input:
                    bZ # Find its index in:
                    C # The lowercase alphabet
                    pu # Plus the uppercase alphabet
                    # (-1 if it is not a letter)
                    g # And get the character at that index in:
                    `…ypetjkŠkp¡okrtyp©jkyb` # Get the lowercase Corpus alphabet
                    pu) # Plus the uppercase Corpus alphabet
                    i # Add Z at the end (index -1)





                    share|improve this answer































                      0















                      Python 2, 138 132 bytes





                      def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return''.join((x,b[a.find(x)])[x in a]for x in i)


                      Try it online!



                      Actually shorter with a named function than with a lambda!



                      lambda version, 138 bytes





                      lambda i,a='bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',b='typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB':''.join((x,b[a.find(x)])[x in a]for x in i)


                      Try it online!



                      131 125 if we are allowed to return an array of characters and have the join outside the function.





                      def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return[(x,b[a.find(x)])[x in a]for x in i]


                      Try it online!






                      share|improve this answer



















                      • 1




                        You can still use a lambda if you make a and b global variables
                        – Black Owl Kai
                        Dec 20 at 22:58










                      • @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                        – ElPedro
                        Dec 20 at 22:59










                      • Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                        – Black Owl Kai
                        Dec 20 at 23:08












                      • Beats mine and different enough for you to post as your own answer. I'll upvote :)
                        – ElPedro
                        Dec 20 at 23:09










                      • Feel free to steal my test cases as well. They took longer to type in than the code...
                        – ElPedro
                        Dec 20 at 23:12



















                      0















                      PHP, 100 bytes



                      Code



                      <?=strtr($argv[0],($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u),($v=typtjktkpstkrtyptjkyb).$f($v));


                      Try it online!



                      Explanation



                      # using the provided character mapping given on the question, as an array
                      strtr($argv[0], # strtr for the string replacement
                      ($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u), # Taking onthe the keys for the first string
                      ($v=typtjktkpstkrtyptjkyb).$f($v)); # Using the values for second string
                      # In both Strings appending the upper version of each string.





                      share|improve this answer





























                        0














                        Pyth, 35 Bytes



                        XQ.*m+r1dd[tG."byàHuH¯¹e?rJyfh


                        Try it!



                        Could probably use Left map or something to get rid of the two d's, but I couldn't figure out how.






                        share|improve this answer





























                          0














                          Java, 211 Bytes



                          a->{String b="BCDFGHJLMNPQRSTVWXZbcdfghjlmnpqrstvwxz",c="TYPTJKTPSTKRTYPTJKBtyptjktpstkrtyptjkb";a.chars().map(x->{int z;return(z=b.indexOf(x))>-1?c.toCharArray()[z]:x;}).forEach(x->System.out.print((char)x));};


                          Try it online!






                          share|improve this answer































                            0














                            Pyth, 34 chars



                            J."byàHuH¯¹e?rJyfh"XXztGJrtG1rJ1


                            Try it online!



                            The string is a compressed version of "typetjkitkpstokrtyputjkyb". For some reason I cannot get Pyth to compress "atypetjkitkpstokrtyputjkyb" with the function


                            +++.N++hSzeSzCi-RChSzCMz-hCeSzChSzN

                            even though it would probably save a byte or two as the two t's could be eliminated.




                            share|improve this answer








                            New contributor




                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.


























                              0















                              Tcl, 114 bytes



                              proc C s {string map [split {btcydpftgjhkjtlpmsntpkqrrtsytpvtwjxkzbBTCYDPFTGJHKJTLPMSNTPKQRRTSYTPVTWJXKZB} ""] $s}


                              Try it online!






                              share|improve this answer





















                                Your Answer





                                StackExchange.ifUsing("editor", function () {
                                return StackExchange.using("mathjaxEditing", function () {
                                StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
                                StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
                                });
                                });
                                }, "mathjax-editing");

                                StackExchange.ifUsing("editor", function () {
                                StackExchange.using("externalEditor", function () {
                                StackExchange.using("snippets", function () {
                                StackExchange.snippets.init();
                                });
                                });
                                }, "code-snippets");

                                StackExchange.ready(function() {
                                var channelOptions = {
                                tags: "".split(" "),
                                id: "200"
                                };
                                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                                StackExchange.using("externalEditor", function() {
                                // Have to fire editor after snippets, if snippets enabled
                                if (StackExchange.settings.snippets.snippetsEnabled) {
                                StackExchange.using("snippets", function() {
                                createEditor();
                                });
                                }
                                else {
                                createEditor();
                                }
                                });

                                function createEditor() {
                                StackExchange.prepareEditor({
                                heartbeatType: 'answer',
                                autoActivateHeartbeat: false,
                                convertImagesToLinks: false,
                                noModals: true,
                                showLowRepImageUploadWarning: true,
                                reputationToPostImages: null,
                                bindNavPrevention: true,
                                postfix: "",
                                imageUploader: {
                                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                                allowUrls: true
                                },
                                onDemand: true,
                                discardSelector: ".discard-answer"
                                ,immediatelyShowMarkdownHelp:true
                                });


                                }
                                });














                                draft saved

                                draft discarded


















                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f177866%2ftranslate-english-to-corpus%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown

























                                21 Answers
                                21






                                active

                                oldest

                                votes








                                21 Answers
                                21






                                active

                                oldest

                                votes









                                active

                                oldest

                                votes






                                active

                                oldest

                                votes









                                7















                                Bash + coreutils, 46





                                tr b-zB-Z ${a=typetjkitkpstokrtyputjkyb}${a^^}


                                Try it online!






                                share|improve this answer


























                                  7















                                  Bash + coreutils, 46





                                  tr b-zB-Z ${a=typetjkitkpstokrtyputjkyb}${a^^}


                                  Try it online!






                                  share|improve this answer
























                                    7












                                    7








                                    7







                                    Bash + coreutils, 46





                                    tr b-zB-Z ${a=typetjkitkpstokrtyputjkyb}${a^^}


                                    Try it online!






                                    share|improve this answer













                                    Bash + coreutils, 46





                                    tr b-zB-Z ${a=typetjkitkpstokrtyputjkyb}${a^^}


                                    Try it online!







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Dec 20 at 20:06









                                    Digital Trauma

                                    58.5k787220




                                    58.5k787220























                                        4















                                        05AB1E, 24 bytes



                                        ži.•ÜÁ©;«ìñä°ÔG·ÖYΘ•Du«‡


                                        Explanation:



                                                               ‡   transliterate
                                        ži a-zA-Z with
                                        .•ÜÁ©;«ìñä°ÔG·ÖYΘ• atypetjkitkpstokrtyputjkyb
                                        Du« concatenated with itself, uppercased


                                        Try it online!






                                        share|improve this answer























                                        • Minor 24 bytes alternative by transliterating just the consonants.
                                          – Kevin Cruijssen
                                          Dec 22 at 17:29


















                                        4















                                        05AB1E, 24 bytes



                                        ži.•ÜÁ©;«ìñä°ÔG·ÖYΘ•Du«‡


                                        Explanation:



                                                               ‡   transliterate
                                        ži a-zA-Z with
                                        .•ÜÁ©;«ìñä°ÔG·ÖYΘ• atypetjkitkpstokrtyputjkyb
                                        Du« concatenated with itself, uppercased


                                        Try it online!






                                        share|improve this answer























                                        • Minor 24 bytes alternative by transliterating just the consonants.
                                          – Kevin Cruijssen
                                          Dec 22 at 17:29
















                                        4












                                        4








                                        4







                                        05AB1E, 24 bytes



                                        ži.•ÜÁ©;«ìñä°ÔG·ÖYΘ•Du«‡


                                        Explanation:



                                                               ‡   transliterate
                                        ži a-zA-Z with
                                        .•ÜÁ©;«ìñä°ÔG·ÖYΘ• atypetjkitkpstokrtyputjkyb
                                        Du« concatenated with itself, uppercased


                                        Try it online!






                                        share|improve this answer















                                        05AB1E, 24 bytes



                                        ži.•ÜÁ©;«ìñä°ÔG·ÖYΘ•Du«‡


                                        Explanation:



                                                               ‡   transliterate
                                        ži a-zA-Z with
                                        .•ÜÁ©;«ìñä°ÔG·ÖYΘ• atypetjkitkpstokrtyputjkyb
                                        Du« concatenated with itself, uppercased


                                        Try it online!







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Dec 20 at 19:56

























                                        answered Dec 20 at 19:46









                                        Okx

                                        12.5k127102




                                        12.5k127102












                                        • Minor 24 bytes alternative by transliterating just the consonants.
                                          – Kevin Cruijssen
                                          Dec 22 at 17:29




















                                        • Minor 24 bytes alternative by transliterating just the consonants.
                                          – Kevin Cruijssen
                                          Dec 22 at 17:29


















                                        Minor 24 bytes alternative by transliterating just the consonants.
                                        – Kevin Cruijssen
                                        Dec 22 at 17:29






                                        Minor 24 bytes alternative by transliterating just the consonants.
                                        – Kevin Cruijssen
                                        Dec 22 at 17:29













                                        4















                                        Charcoal, 42 bytes



                                        ≔”$⌊∧T-¶I^F⁷ü@n⁹γ›7η”η⭆θ⎇№β↧ι§⎇№βι↧ηη⌕β↧ιι


                                        Try it online! Link is to verbose version of code. Explanation:



                                        ≔                       Assign
                                        ”$⌊∧T-¶I^F⁷ü@n⁹γ›7η” Compressed string `ATYPETJKITKPSTOKRTYPUTJKYB`
                                        η To variable

                                        θ Input string
                                        ⭆ Map over characters and join
                                        ⎇ If
                                        β Lowercase alphabet
                                        № Contains
                                        ι Current character
                                        ↧ Lowercased
                                        (Then)
                                        ⎇ If
                                        β Lowercase alphabet
                                        № Contains
                                        ι Current character
                                        (Then)
                                        η Variable
                                        ↧ Lowercased
                                        (Else)
                                        η Variable
                                        § Indexed by
                                        ⌕ Index of
                                        ι Current character
                                        ↧ Lowercased
                                        β In lowercase alphabet
                                        (Else)
                                        ι Current character
                                        Implicitly print





                                        share|improve this answer


























                                          4















                                          Charcoal, 42 bytes



                                          ≔”$⌊∧T-¶I^F⁷ü@n⁹γ›7η”η⭆θ⎇№β↧ι§⎇№βι↧ηη⌕β↧ιι


                                          Try it online! Link is to verbose version of code. Explanation:



                                          ≔                       Assign
                                          ”$⌊∧T-¶I^F⁷ü@n⁹γ›7η” Compressed string `ATYPETJKITKPSTOKRTYPUTJKYB`
                                          η To variable

                                          θ Input string
                                          ⭆ Map over characters and join
                                          ⎇ If
                                          β Lowercase alphabet
                                          № Contains
                                          ι Current character
                                          ↧ Lowercased
                                          (Then)
                                          ⎇ If
                                          β Lowercase alphabet
                                          № Contains
                                          ι Current character
                                          (Then)
                                          η Variable
                                          ↧ Lowercased
                                          (Else)
                                          η Variable
                                          § Indexed by
                                          ⌕ Index of
                                          ι Current character
                                          ↧ Lowercased
                                          β In lowercase alphabet
                                          (Else)
                                          ι Current character
                                          Implicitly print





                                          share|improve this answer
























                                            4












                                            4








                                            4







                                            Charcoal, 42 bytes



                                            ≔”$⌊∧T-¶I^F⁷ü@n⁹γ›7η”η⭆θ⎇№β↧ι§⎇№βι↧ηη⌕β↧ιι


                                            Try it online! Link is to verbose version of code. Explanation:



                                            ≔                       Assign
                                            ”$⌊∧T-¶I^F⁷ü@n⁹γ›7η” Compressed string `ATYPETJKITKPSTOKRTYPUTJKYB`
                                            η To variable

                                            θ Input string
                                            ⭆ Map over characters and join
                                            ⎇ If
                                            β Lowercase alphabet
                                            № Contains
                                            ι Current character
                                            ↧ Lowercased
                                            (Then)
                                            ⎇ If
                                            β Lowercase alphabet
                                            № Contains
                                            ι Current character
                                            (Then)
                                            η Variable
                                            ↧ Lowercased
                                            (Else)
                                            η Variable
                                            § Indexed by
                                            ⌕ Index of
                                            ι Current character
                                            ↧ Lowercased
                                            β In lowercase alphabet
                                            (Else)
                                            ι Current character
                                            Implicitly print





                                            share|improve this answer













                                            Charcoal, 42 bytes



                                            ≔”$⌊∧T-¶I^F⁷ü@n⁹γ›7η”η⭆θ⎇№β↧ι§⎇№βι↧ηη⌕β↧ιι


                                            Try it online! Link is to verbose version of code. Explanation:



                                            ≔                       Assign
                                            ”$⌊∧T-¶I^F⁷ü@n⁹γ›7η” Compressed string `ATYPETJKITKPSTOKRTYPUTJKYB`
                                            η To variable

                                            θ Input string
                                            ⭆ Map over characters and join
                                            ⎇ If
                                            β Lowercase alphabet
                                            № Contains
                                            ι Current character
                                            ↧ Lowercased
                                            (Then)
                                            ⎇ If
                                            β Lowercase alphabet
                                            № Contains
                                            ι Current character
                                            (Then)
                                            η Variable
                                            ↧ Lowercased
                                            (Else)
                                            η Variable
                                            § Indexed by
                                            ⌕ Index of
                                            ι Current character
                                            ↧ Lowercased
                                            β In lowercase alphabet
                                            (Else)
                                            ι Current character
                                            Implicitly print






                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Dec 20 at 21:00









                                            Neil

                                            79.3k744177




                                            79.3k744177























                                                4














                                                T-SQL, 107 Bytes



                                                SELECT TRANSLATE(v,'bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',
                                                'typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB')FROM t


                                                Line break and indent are for readability only.



                                                Uses the SQL 2017 function TRANSLATE for character replacement.



                                                Unfortunately had to put (almost) the entire alphabet in there twice to maintain casing. There are probably better ways, maybe something that handles the t's as a group, but this worked for me.



                                                Input is via a pre-existing table t with varchar column v, per our IO rules.



                                                In this case the table must be created using a case-sensitive collation, either by running on a case-sensitive server, or by using the COLLATE keyword (not counted toward character total):



                                                CREATE TABLE t(v varchar(999) COLLATE Latin1_General_CS_AS)





                                                share|improve this answer




























                                                  4














                                                  T-SQL, 107 Bytes



                                                  SELECT TRANSLATE(v,'bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',
                                                  'typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB')FROM t


                                                  Line break and indent are for readability only.



                                                  Uses the SQL 2017 function TRANSLATE for character replacement.



                                                  Unfortunately had to put (almost) the entire alphabet in there twice to maintain casing. There are probably better ways, maybe something that handles the t's as a group, but this worked for me.



                                                  Input is via a pre-existing table t with varchar column v, per our IO rules.



                                                  In this case the table must be created using a case-sensitive collation, either by running on a case-sensitive server, or by using the COLLATE keyword (not counted toward character total):



                                                  CREATE TABLE t(v varchar(999) COLLATE Latin1_General_CS_AS)





                                                  share|improve this answer


























                                                    4












                                                    4








                                                    4






                                                    T-SQL, 107 Bytes



                                                    SELECT TRANSLATE(v,'bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',
                                                    'typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB')FROM t


                                                    Line break and indent are for readability only.



                                                    Uses the SQL 2017 function TRANSLATE for character replacement.



                                                    Unfortunately had to put (almost) the entire alphabet in there twice to maintain casing. There are probably better ways, maybe something that handles the t's as a group, but this worked for me.



                                                    Input is via a pre-existing table t with varchar column v, per our IO rules.



                                                    In this case the table must be created using a case-sensitive collation, either by running on a case-sensitive server, or by using the COLLATE keyword (not counted toward character total):



                                                    CREATE TABLE t(v varchar(999) COLLATE Latin1_General_CS_AS)





                                                    share|improve this answer














                                                    T-SQL, 107 Bytes



                                                    SELECT TRANSLATE(v,'bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',
                                                    'typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB')FROM t


                                                    Line break and indent are for readability only.



                                                    Uses the SQL 2017 function TRANSLATE for character replacement.



                                                    Unfortunately had to put (almost) the entire alphabet in there twice to maintain casing. There are probably better ways, maybe something that handles the t's as a group, but this worked for me.



                                                    Input is via a pre-existing table t with varchar column v, per our IO rules.



                                                    In this case the table must be created using a case-sensitive collation, either by running on a case-sensitive server, or by using the COLLATE keyword (not counted toward character total):



                                                    CREATE TABLE t(v varchar(999) COLLATE Latin1_General_CS_AS)






                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Dec 20 at 22:39

























                                                    answered Dec 20 at 19:46









                                                    BradC

                                                    3,719523




                                                    3,719523























                                                        3















                                                        JavaScript (Node.js), 100 bytes





                                                        s=>s.replace(/[a-z]/gi,c=>(C='_atypetjkitkpstokrtyputjkyb'[Buffer(c)[0]&31],c>{}?C:C.toUpperCase()))


                                                        Try it online!



                                                        s =>                                  // s = input string
                                                        s.replace( // replace in s ...
                                                        /[a-z]/gi, // ... all letters, no matter the case
                                                        c => ( // for each letter c:
                                                        C = // pick a replacement letter C
                                                        '_atypetjkitkpstokrtyputjkyb' // from a 1-indexed lookup string
                                                        [Buffer(c)[0] & 31], // using the 5 lowest bits of the ASCII code of c
                                                        c > {} ? // if the original letter was in lower case:
                                                        C // use the replacement letter as-is
                                                        : // else:
                                                        C.toUpperCase() // convert it to upper case
                                                        ) //
                                                        ) // end of replace()





                                                        share|improve this answer




























                                                          3















                                                          JavaScript (Node.js), 100 bytes





                                                          s=>s.replace(/[a-z]/gi,c=>(C='_atypetjkitkpstokrtyputjkyb'[Buffer(c)[0]&31],c>{}?C:C.toUpperCase()))


                                                          Try it online!



                                                          s =>                                  // s = input string
                                                          s.replace( // replace in s ...
                                                          /[a-z]/gi, // ... all letters, no matter the case
                                                          c => ( // for each letter c:
                                                          C = // pick a replacement letter C
                                                          '_atypetjkitkpstokrtyputjkyb' // from a 1-indexed lookup string
                                                          [Buffer(c)[0] & 31], // using the 5 lowest bits of the ASCII code of c
                                                          c > {} ? // if the original letter was in lower case:
                                                          C // use the replacement letter as-is
                                                          : // else:
                                                          C.toUpperCase() // convert it to upper case
                                                          ) //
                                                          ) // end of replace()





                                                          share|improve this answer


























                                                            3












                                                            3








                                                            3







                                                            JavaScript (Node.js), 100 bytes





                                                            s=>s.replace(/[a-z]/gi,c=>(C='_atypetjkitkpstokrtyputjkyb'[Buffer(c)[0]&31],c>{}?C:C.toUpperCase()))


                                                            Try it online!



                                                            s =>                                  // s = input string
                                                            s.replace( // replace in s ...
                                                            /[a-z]/gi, // ... all letters, no matter the case
                                                            c => ( // for each letter c:
                                                            C = // pick a replacement letter C
                                                            '_atypetjkitkpstokrtyputjkyb' // from a 1-indexed lookup string
                                                            [Buffer(c)[0] & 31], // using the 5 lowest bits of the ASCII code of c
                                                            c > {} ? // if the original letter was in lower case:
                                                            C // use the replacement letter as-is
                                                            : // else:
                                                            C.toUpperCase() // convert it to upper case
                                                            ) //
                                                            ) // end of replace()





                                                            share|improve this answer















                                                            JavaScript (Node.js), 100 bytes





                                                            s=>s.replace(/[a-z]/gi,c=>(C='_atypetjkitkpstokrtyputjkyb'[Buffer(c)[0]&31],c>{}?C:C.toUpperCase()))


                                                            Try it online!



                                                            s =>                                  // s = input string
                                                            s.replace( // replace in s ...
                                                            /[a-z]/gi, // ... all letters, no matter the case
                                                            c => ( // for each letter c:
                                                            C = // pick a replacement letter C
                                                            '_atypetjkitkpstokrtyputjkyb' // from a 1-indexed lookup string
                                                            [Buffer(c)[0] & 31], // using the 5 lowest bits of the ASCII code of c
                                                            c > {} ? // if the original letter was in lower case:
                                                            C // use the replacement letter as-is
                                                            : // else:
                                                            C.toUpperCase() // convert it to upper case
                                                            ) //
                                                            ) // end of replace()






                                                            share|improve this answer














                                                            share|improve this answer



                                                            share|improve this answer








                                                            edited Dec 20 at 23:53

























                                                            answered Dec 20 at 21:32









                                                            Arnauld

                                                            72.3k689303




                                                            72.3k689303























                                                                3















                                                                R, 79 bytes





                                                                function(x)chartr("b-zB-Z",paste0(y<-"typetjkitkpstokrtyputjkyb",toupper(y)),x)


                                                                Try it online!



                                                                Only 3 bytes shorter than literally typing both lower- and uppercase replacement strings together...




                                                                R, 79 bytes





                                                                function(x,`[`=chartr)"B-Z"[toupper(y),"b-z"[y<-"typetjkitkpstokrtyputjkyb",x]]


                                                                Try it online!



                                                                Fancier code, same byte count.






                                                                share|improve this answer




























                                                                  3















                                                                  R, 79 bytes





                                                                  function(x)chartr("b-zB-Z",paste0(y<-"typetjkitkpstokrtyputjkyb",toupper(y)),x)


                                                                  Try it online!



                                                                  Only 3 bytes shorter than literally typing both lower- and uppercase replacement strings together...




                                                                  R, 79 bytes





                                                                  function(x,`[`=chartr)"B-Z"[toupper(y),"b-z"[y<-"typetjkitkpstokrtyputjkyb",x]]


                                                                  Try it online!



                                                                  Fancier code, same byte count.






                                                                  share|improve this answer


























                                                                    3












                                                                    3








                                                                    3







                                                                    R, 79 bytes





                                                                    function(x)chartr("b-zB-Z",paste0(y<-"typetjkitkpstokrtyputjkyb",toupper(y)),x)


                                                                    Try it online!



                                                                    Only 3 bytes shorter than literally typing both lower- and uppercase replacement strings together...




                                                                    R, 79 bytes





                                                                    function(x,`[`=chartr)"B-Z"[toupper(y),"b-z"[y<-"typetjkitkpstokrtyputjkyb",x]]


                                                                    Try it online!



                                                                    Fancier code, same byte count.






                                                                    share|improve this answer















                                                                    R, 79 bytes





                                                                    function(x)chartr("b-zB-Z",paste0(y<-"typetjkitkpstokrtyputjkyb",toupper(y)),x)


                                                                    Try it online!



                                                                    Only 3 bytes shorter than literally typing both lower- and uppercase replacement strings together...




                                                                    R, 79 bytes





                                                                    function(x,`[`=chartr)"B-Z"[toupper(y),"b-z"[y<-"typetjkitkpstokrtyputjkyb",x]]


                                                                    Try it online!



                                                                    Fancier code, same byte count.







                                                                    share|improve this answer














                                                                    share|improve this answer



                                                                    share|improve this answer








                                                                    edited Dec 21 at 13:33

























                                                                    answered Dec 21 at 13:11









                                                                    Kirill L.

                                                                    3,6551318




                                                                    3,6551318























                                                                        2















                                                                        Perl 5 -p, 54 bytes





                                                                        eval"y/B-Zb-z/".uc($a=typetjkitkpstokrtyputjkyb)."$a/"


                                                                        Try it online!






                                                                        share|improve this answer


























                                                                          2















                                                                          Perl 5 -p, 54 bytes





                                                                          eval"y/B-Zb-z/".uc($a=typetjkitkpstokrtyputjkyb)."$a/"


                                                                          Try it online!






                                                                          share|improve this answer
























                                                                            2












                                                                            2








                                                                            2







                                                                            Perl 5 -p, 54 bytes





                                                                            eval"y/B-Zb-z/".uc($a=typetjkitkpstokrtyputjkyb)."$a/"


                                                                            Try it online!






                                                                            share|improve this answer













                                                                            Perl 5 -p, 54 bytes





                                                                            eval"y/B-Zb-z/".uc($a=typetjkitkpstokrtyputjkyb)."$a/"


                                                                            Try it online!







                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered Dec 21 at 3:21









                                                                            Xcali

                                                                            5,168520




                                                                            5,168520























                                                                                2















                                                                                Ruby, 55 bytes





                                                                                $_.tr!"b-zB-Z",(x="typetjkitkpstokrtyputjkyb")+x.upcase


                                                                                Try it online!






                                                                                share|improve this answer


























                                                                                  2















                                                                                  Ruby, 55 bytes





                                                                                  $_.tr!"b-zB-Z",(x="typetjkitkpstokrtyputjkyb")+x.upcase


                                                                                  Try it online!






                                                                                  share|improve this answer
























                                                                                    2












                                                                                    2








                                                                                    2







                                                                                    Ruby, 55 bytes





                                                                                    $_.tr!"b-zB-Z",(x="typetjkitkpstokrtyputjkyb")+x.upcase


                                                                                    Try it online!






                                                                                    share|improve this answer













                                                                                    Ruby, 55 bytes





                                                                                    $_.tr!"b-zB-Z",(x="typetjkitkpstokrtyputjkyb")+x.upcase


                                                                                    Try it online!







                                                                                    share|improve this answer












                                                                                    share|improve this answer



                                                                                    share|improve this answer










                                                                                    answered Dec 21 at 8:58









                                                                                    Kirill L.

                                                                                    3,6551318




                                                                                    3,6551318























                                                                                        2















                                                                                        J, 78 61 bytes



                                                                                        -17 bytes thanks to FrownyFrog!



                                                                                        rplc(u:,98 66+/i.25);"0(,toupper)@'typetjkitkpstokrtyputjkyb'


                                                                                        Try it online!






                                                                                        share|improve this answer



















                                                                                        • 2




                                                                                          61
                                                                                          – FrownyFrog
                                                                                          Dec 21 at 10:52










                                                                                        • @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                          – Galen Ivanov
                                                                                          Dec 21 at 11:27


















                                                                                        2















                                                                                        J, 78 61 bytes



                                                                                        -17 bytes thanks to FrownyFrog!



                                                                                        rplc(u:,98 66+/i.25);"0(,toupper)@'typetjkitkpstokrtyputjkyb'


                                                                                        Try it online!






                                                                                        share|improve this answer



















                                                                                        • 2




                                                                                          61
                                                                                          – FrownyFrog
                                                                                          Dec 21 at 10:52










                                                                                        • @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                          – Galen Ivanov
                                                                                          Dec 21 at 11:27
















                                                                                        2












                                                                                        2








                                                                                        2







                                                                                        J, 78 61 bytes



                                                                                        -17 bytes thanks to FrownyFrog!



                                                                                        rplc(u:,98 66+/i.25);"0(,toupper)@'typetjkitkpstokrtyputjkyb'


                                                                                        Try it online!






                                                                                        share|improve this answer















                                                                                        J, 78 61 bytes



                                                                                        -17 bytes thanks to FrownyFrog!



                                                                                        rplc(u:,98 66+/i.25);"0(,toupper)@'typetjkitkpstokrtyputjkyb'


                                                                                        Try it online!







                                                                                        share|improve this answer














                                                                                        share|improve this answer



                                                                                        share|improve this answer








                                                                                        edited Dec 21 at 11:29

























                                                                                        answered Dec 21 at 9:33









                                                                                        Galen Ivanov

                                                                                        6,31711032




                                                                                        6,31711032








                                                                                        • 2




                                                                                          61
                                                                                          – FrownyFrog
                                                                                          Dec 21 at 10:52










                                                                                        • @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                          – Galen Ivanov
                                                                                          Dec 21 at 11:27
















                                                                                        • 2




                                                                                          61
                                                                                          – FrownyFrog
                                                                                          Dec 21 at 10:52










                                                                                        • @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                          – Galen Ivanov
                                                                                          Dec 21 at 11:27










                                                                                        2




                                                                                        2




                                                                                        61
                                                                                        – FrownyFrog
                                                                                        Dec 21 at 10:52




                                                                                        61
                                                                                        – FrownyFrog
                                                                                        Dec 21 at 10:52












                                                                                        @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                        – Galen Ivanov
                                                                                        Dec 21 at 11:27






                                                                                        @FrownyFrog Thanks! In my J804 I can't use constants at the right-hand side. I need to upgrade :) My solution is ugly nevertheless....
                                                                                        – Galen Ivanov
                                                                                        Dec 21 at 11:27













                                                                                        2















                                                                                        K (ngn/k), 87 63 61 60 59 57 bytes



                                                                                        {`c$x-a-@[!128;98+!25;:;"typetjkitkpstokrtyputjkyb"]a:_x}


                                                                                        Try it online!



                                                                                        { } function with argument x



                                                                                        _ to lowercase



                                                                                        a: assign to a



                                                                                        !128 the list 0 1 2 ... 127



                                                                                        @[!128; indices ;:; values ] amend it by replacing the elements at indices with the given values



                                                                                        98+!25 the list 98 99 100 ... 122 which are the ascii codes for "bcd...z"



                                                                                        juxtaposition is indexing, so we use a (implicitly converted to integers) as indices in the amended list



                                                                                        x-a- subtract from a, then subtract form x; this restores upper/lowercase as in the original string



                                                                                        `c$ convert to characters






                                                                                        share|improve this answer




























                                                                                          2















                                                                                          K (ngn/k), 87 63 61 60 59 57 bytes



                                                                                          {`c$x-a-@[!128;98+!25;:;"typetjkitkpstokrtyputjkyb"]a:_x}


                                                                                          Try it online!



                                                                                          { } function with argument x



                                                                                          _ to lowercase



                                                                                          a: assign to a



                                                                                          !128 the list 0 1 2 ... 127



                                                                                          @[!128; indices ;:; values ] amend it by replacing the elements at indices with the given values



                                                                                          98+!25 the list 98 99 100 ... 122 which are the ascii codes for "bcd...z"



                                                                                          juxtaposition is indexing, so we use a (implicitly converted to integers) as indices in the amended list



                                                                                          x-a- subtract from a, then subtract form x; this restores upper/lowercase as in the original string



                                                                                          `c$ convert to characters






                                                                                          share|improve this answer


























                                                                                            2












                                                                                            2








                                                                                            2







                                                                                            K (ngn/k), 87 63 61 60 59 57 bytes



                                                                                            {`c$x-a-@[!128;98+!25;:;"typetjkitkpstokrtyputjkyb"]a:_x}


                                                                                            Try it online!



                                                                                            { } function with argument x



                                                                                            _ to lowercase



                                                                                            a: assign to a



                                                                                            !128 the list 0 1 2 ... 127



                                                                                            @[!128; indices ;:; values ] amend it by replacing the elements at indices with the given values



                                                                                            98+!25 the list 98 99 100 ... 122 which are the ascii codes for "bcd...z"



                                                                                            juxtaposition is indexing, so we use a (implicitly converted to integers) as indices in the amended list



                                                                                            x-a- subtract from a, then subtract form x; this restores upper/lowercase as in the original string



                                                                                            `c$ convert to characters






                                                                                            share|improve this answer















                                                                                            K (ngn/k), 87 63 61 60 59 57 bytes



                                                                                            {`c$x-a-@[!128;98+!25;:;"typetjkitkpstokrtyputjkyb"]a:_x}


                                                                                            Try it online!



                                                                                            { } function with argument x



                                                                                            _ to lowercase



                                                                                            a: assign to a



                                                                                            !128 the list 0 1 2 ... 127



                                                                                            @[!128; indices ;:; values ] amend it by replacing the elements at indices with the given values



                                                                                            98+!25 the list 98 99 100 ... 122 which are the ascii codes for "bcd...z"



                                                                                            juxtaposition is indexing, so we use a (implicitly converted to integers) as indices in the amended list



                                                                                            x-a- subtract from a, then subtract form x; this restores upper/lowercase as in the original string



                                                                                            `c$ convert to characters







                                                                                            share|improve this answer














                                                                                            share|improve this answer



                                                                                            share|improve this answer








                                                                                            edited Dec 21 at 15:19

























                                                                                            answered Dec 21 at 11:22









                                                                                            ngn

                                                                                            6,93112559




                                                                                            6,93112559























                                                                                                2















                                                                                                C# (Visual C# Interactive Compiler), 151 83 bytes





                                                                                                n=>n.Select(a=>char.IsLetter(a)?(char)(" ATYPETJKITKPSTOKRTYPUTJKYB"[a%32]|a&32):a)


                                                                                                Try it online!



                                                                                                Saved a whopping 68 bytes thanks to Pietu1998!






                                                                                                share|improve this answer























                                                                                                • You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                  – Pietu1998
                                                                                                  Dec 21 at 14:01












                                                                                                • Thanks! Nice trick with the bit wise operators!
                                                                                                  – Embodiment of Ignorance
                                                                                                  Dec 21 at 16:23
















                                                                                                2















                                                                                                C# (Visual C# Interactive Compiler), 151 83 bytes





                                                                                                n=>n.Select(a=>char.IsLetter(a)?(char)(" ATYPETJKITKPSTOKRTYPUTJKYB"[a%32]|a&32):a)


                                                                                                Try it online!



                                                                                                Saved a whopping 68 bytes thanks to Pietu1998!






                                                                                                share|improve this answer























                                                                                                • You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                  – Pietu1998
                                                                                                  Dec 21 at 14:01












                                                                                                • Thanks! Nice trick with the bit wise operators!
                                                                                                  – Embodiment of Ignorance
                                                                                                  Dec 21 at 16:23














                                                                                                2












                                                                                                2








                                                                                                2







                                                                                                C# (Visual C# Interactive Compiler), 151 83 bytes





                                                                                                n=>n.Select(a=>char.IsLetter(a)?(char)(" ATYPETJKITKPSTOKRTYPUTJKYB"[a%32]|a&32):a)


                                                                                                Try it online!



                                                                                                Saved a whopping 68 bytes thanks to Pietu1998!






                                                                                                share|improve this answer















                                                                                                C# (Visual C# Interactive Compiler), 151 83 bytes





                                                                                                n=>n.Select(a=>char.IsLetter(a)?(char)(" ATYPETJKITKPSTOKRTYPUTJKYB"[a%32]|a&32):a)


                                                                                                Try it online!



                                                                                                Saved a whopping 68 bytes thanks to Pietu1998!







                                                                                                share|improve this answer














                                                                                                share|improve this answer



                                                                                                share|improve this answer








                                                                                                edited Dec 21 at 16:23

























                                                                                                answered Dec 21 at 5:08









                                                                                                Embodiment of Ignorance

                                                                                                24711




                                                                                                24711












                                                                                                • You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                  – Pietu1998
                                                                                                  Dec 21 at 14:01












                                                                                                • Thanks! Nice trick with the bit wise operators!
                                                                                                  – Embodiment of Ignorance
                                                                                                  Dec 21 at 16:23


















                                                                                                • You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                  – Pietu1998
                                                                                                  Dec 21 at 14:01












                                                                                                • Thanks! Nice trick with the bit wise operators!
                                                                                                  – Embodiment of Ignorance
                                                                                                  Dec 21 at 16:23
















                                                                                                You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                – Pietu1998
                                                                                                Dec 21 at 14:01






                                                                                                You can get this down to 83 bytes by removing the range, combining the Selects and using bitwise operators for casing.
                                                                                                – Pietu1998
                                                                                                Dec 21 at 14:01














                                                                                                Thanks! Nice trick with the bit wise operators!
                                                                                                – Embodiment of Ignorance
                                                                                                Dec 21 at 16:23




                                                                                                Thanks! Nice trick with the bit wise operators!
                                                                                                – Embodiment of Ignorance
                                                                                                Dec 21 at 16:23











                                                                                                1















                                                                                                Retina 0.8.2, 59 bytes



                                                                                                [a-z]
                                                                                                $&
                                                                                                T`l`L
                                                                                                T`L`ATYPETJKITKPSTOKRTYPUTJKYB
                                                                                                T`L `l_` .


                                                                                                Try it online! Link includes test cases. Explanation:



                                                                                                [a-z]
                                                                                                $&


                                                                                                Prefix a non-ASCII character to each letter. (I tried to use a non-breaking space but Firefox might have changed it back to a regular space after copying and pasting.)



                                                                                                T`l`L


                                                                                                Uppercase all of the letters.



                                                                                                T`L`ATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                Convert the letters to Corpus.



                                                                                                T`L `l_` .


                                                                                                Lowercase the letters after the non-ASCII character and delete the non-ASCII character.



                                                                                                Naïve solution is 63 bytes:



                                                                                                T`lL`atypetjkitkpstokrtyputjkybATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                Try it online! Link includes test cases.






                                                                                                share|improve this answer


























                                                                                                  1















                                                                                                  Retina 0.8.2, 59 bytes



                                                                                                  [a-z]
                                                                                                  $&
                                                                                                  T`l`L
                                                                                                  T`L`ATYPETJKITKPSTOKRTYPUTJKYB
                                                                                                  T`L `l_` .


                                                                                                  Try it online! Link includes test cases. Explanation:



                                                                                                  [a-z]
                                                                                                  $&


                                                                                                  Prefix a non-ASCII character to each letter. (I tried to use a non-breaking space but Firefox might have changed it back to a regular space after copying and pasting.)



                                                                                                  T`l`L


                                                                                                  Uppercase all of the letters.



                                                                                                  T`L`ATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                  Convert the letters to Corpus.



                                                                                                  T`L `l_` .


                                                                                                  Lowercase the letters after the non-ASCII character and delete the non-ASCII character.



                                                                                                  Naïve solution is 63 bytes:



                                                                                                  T`lL`atypetjkitkpstokrtyputjkybATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                  Try it online! Link includes test cases.






                                                                                                  share|improve this answer
























                                                                                                    1












                                                                                                    1








                                                                                                    1







                                                                                                    Retina 0.8.2, 59 bytes



                                                                                                    [a-z]
                                                                                                    $&
                                                                                                    T`l`L
                                                                                                    T`L`ATYPETJKITKPSTOKRTYPUTJKYB
                                                                                                    T`L `l_` .


                                                                                                    Try it online! Link includes test cases. Explanation:



                                                                                                    [a-z]
                                                                                                    $&


                                                                                                    Prefix a non-ASCII character to each letter. (I tried to use a non-breaking space but Firefox might have changed it back to a regular space after copying and pasting.)



                                                                                                    T`l`L


                                                                                                    Uppercase all of the letters.



                                                                                                    T`L`ATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                    Convert the letters to Corpus.



                                                                                                    T`L `l_` .


                                                                                                    Lowercase the letters after the non-ASCII character and delete the non-ASCII character.



                                                                                                    Naïve solution is 63 bytes:



                                                                                                    T`lL`atypetjkitkpstokrtyputjkybATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                    Try it online! Link includes test cases.






                                                                                                    share|improve this answer













                                                                                                    Retina 0.8.2, 59 bytes



                                                                                                    [a-z]
                                                                                                    $&
                                                                                                    T`l`L
                                                                                                    T`L`ATYPETJKITKPSTOKRTYPUTJKYB
                                                                                                    T`L `l_` .


                                                                                                    Try it online! Link includes test cases. Explanation:



                                                                                                    [a-z]
                                                                                                    $&


                                                                                                    Prefix a non-ASCII character to each letter. (I tried to use a non-breaking space but Firefox might have changed it back to a regular space after copying and pasting.)



                                                                                                    T`l`L


                                                                                                    Uppercase all of the letters.



                                                                                                    T`L`ATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                    Convert the letters to Corpus.



                                                                                                    T`L `l_` .


                                                                                                    Lowercase the letters after the non-ASCII character and delete the non-ASCII character.



                                                                                                    Naïve solution is 63 bytes:



                                                                                                    T`lL`atypetjkitkpstokrtyputjkybATYPETJKITKPSTOKRTYPUTJKYB


                                                                                                    Try it online! Link includes test cases.







                                                                                                    share|improve this answer












                                                                                                    share|improve this answer



                                                                                                    share|improve this answer










                                                                                                    answered Dec 20 at 20:43









                                                                                                    Neil

                                                                                                    79.3k744177




                                                                                                    79.3k744177























                                                                                                        1















                                                                                                        Python 2, 115 bytes





                                                                                                        lambda i:i.translate(''.join(a))
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!



                                                                                                        Adapted from @ElPedro's answer. This generates the replacement for every ascii character in the array a and then uses str.translate.



                                                                                                        Can be brought to 113 bytes if returning an array of chars is acceptable:



                                                                                                        lambda i:[a[ord(x)]for x in i]
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!






                                                                                                        share|improve this answer





















                                                                                                        • Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                          – ElPedro
                                                                                                          Dec 20 at 23:38
















                                                                                                        1















                                                                                                        Python 2, 115 bytes





                                                                                                        lambda i:i.translate(''.join(a))
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!



                                                                                                        Adapted from @ElPedro's answer. This generates the replacement for every ascii character in the array a and then uses str.translate.



                                                                                                        Can be brought to 113 bytes if returning an array of chars is acceptable:



                                                                                                        lambda i:[a[ord(x)]for x in i]
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!






                                                                                                        share|improve this answer





















                                                                                                        • Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                          – ElPedro
                                                                                                          Dec 20 at 23:38














                                                                                                        1












                                                                                                        1








                                                                                                        1







                                                                                                        Python 2, 115 bytes





                                                                                                        lambda i:i.translate(''.join(a))
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!



                                                                                                        Adapted from @ElPedro's answer. This generates the replacement for every ascii character in the array a and then uses str.translate.



                                                                                                        Can be brought to 113 bytes if returning an array of chars is acceptable:



                                                                                                        lambda i:[a[ord(x)]for x in i]
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!






                                                                                                        share|improve this answer













                                                                                                        Python 2, 115 bytes





                                                                                                        lambda i:i.translate(''.join(a))
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!



                                                                                                        Adapted from @ElPedro's answer. This generates the replacement for every ascii character in the array a and then uses str.translate.



                                                                                                        Can be brought to 113 bytes if returning an array of chars is acceptable:



                                                                                                        lambda i:[a[ord(x)]for x in i]
                                                                                                        a=map(chr,range(256))
                                                                                                        b='typetjkitkpstokrtyputjkyb'
                                                                                                        a[66:91]=b.upper();a[98:123]=b


                                                                                                        Try it online!







                                                                                                        share|improve this answer












                                                                                                        share|improve this answer



                                                                                                        share|improve this answer










                                                                                                        answered Dec 20 at 23:22









                                                                                                        Black Owl Kai

                                                                                                        5807




                                                                                                        5807












                                                                                                        • Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                          – ElPedro
                                                                                                          Dec 20 at 23:38


















                                                                                                        • Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                          – ElPedro
                                                                                                          Dec 20 at 23:38
















                                                                                                        Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                        – ElPedro
                                                                                                        Dec 20 at 23:38




                                                                                                        Took some thinking at this time of night to work out how it was doing it. It's been a long day! Nice solution.
                                                                                                        – ElPedro
                                                                                                        Dec 20 at 23:38











                                                                                                        1















                                                                                                        Jelly, 29 bytes



                                                                                                        “qḍỊYl4ḃ©ƭṄxḳ½Dy’ṃⱮØA,Øa¤⁺żẎy


                                                                                                        Try it online!






                                                                                                        share|improve this answer





















                                                                                                        • Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                          – Jonathan Allan
                                                                                                          Dec 21 at 19:01


















                                                                                                        1















                                                                                                        Jelly, 29 bytes



                                                                                                        “qḍỊYl4ḃ©ƭṄxḳ½Dy’ṃⱮØA,Øa¤⁺żẎy


                                                                                                        Try it online!






                                                                                                        share|improve this answer





















                                                                                                        • Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                          – Jonathan Allan
                                                                                                          Dec 21 at 19:01
















                                                                                                        1












                                                                                                        1








                                                                                                        1







                                                                                                        Jelly, 29 bytes



                                                                                                        “qḍỊYl4ḃ©ƭṄxḳ½Dy’ṃⱮØA,Øa¤⁺żẎy


                                                                                                        Try it online!






                                                                                                        share|improve this answer













                                                                                                        Jelly, 29 bytes



                                                                                                        “qḍỊYl4ḃ©ƭṄxḳ½Dy’ṃⱮØA,Øa¤⁺żẎy


                                                                                                        Try it online!







                                                                                                        share|improve this answer












                                                                                                        share|improve this answer



                                                                                                        share|improve this answer










                                                                                                        answered Dec 21 at 12:12









                                                                                                        Erik the Outgolfer

                                                                                                        31.3k429102




                                                                                                        31.3k429102












                                                                                                        • Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                          – Jonathan Allan
                                                                                                          Dec 21 at 19:01




















                                                                                                        • Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                          – Jonathan Allan
                                                                                                          Dec 21 at 19:01


















                                                                                                        Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                        – Jonathan Allan
                                                                                                        Dec 21 at 19:01






                                                                                                        Only need to map consonants, so “ØṖ¦Mṗẏʋ@¥;}/’ṃⱮØCŒH¤⁺żẎy saves 4. (Can't get rid of 'y' with ØY since it's on the right of the map)
                                                                                                        – Jonathan Allan
                                                                                                        Dec 21 at 19:01













                                                                                                        1















                                                                                                        Japt, 37 bytes



                                                                                                        ;®i`…ypetjkŠkp¡okrtyp©jkyb`pu)gCpu bZ


                                                                                                        Try it online!



                                                                                                        The above link includes most test cases, but I haven't been able to input the second to last one as a string because it contains both single and double quotes. Here is that test case, input as an array of characters instead.



                                                                                                        Explanation:



                                                                                                        ;                                        #Set C to the lowercase alphabet
                                                                                                        ® #For each character Z of the input:
                                                                                                        bZ # Find its index in:
                                                                                                        C # The lowercase alphabet
                                                                                                        pu # Plus the uppercase alphabet
                                                                                                        # (-1 if it is not a letter)
                                                                                                        g # And get the character at that index in:
                                                                                                        `…ypetjkŠkp¡okrtyp©jkyb` # Get the lowercase Corpus alphabet
                                                                                                        pu) # Plus the uppercase Corpus alphabet
                                                                                                        i # Add Z at the end (index -1)





                                                                                                        share|improve this answer




























                                                                                                          1















                                                                                                          Japt, 37 bytes



                                                                                                          ;®i`…ypetjkŠkp¡okrtyp©jkyb`pu)gCpu bZ


                                                                                                          Try it online!



                                                                                                          The above link includes most test cases, but I haven't been able to input the second to last one as a string because it contains both single and double quotes. Here is that test case, input as an array of characters instead.



                                                                                                          Explanation:



                                                                                                          ;                                        #Set C to the lowercase alphabet
                                                                                                          ® #For each character Z of the input:
                                                                                                          bZ # Find its index in:
                                                                                                          C # The lowercase alphabet
                                                                                                          pu # Plus the uppercase alphabet
                                                                                                          # (-1 if it is not a letter)
                                                                                                          g # And get the character at that index in:
                                                                                                          `…ypetjkŠkp¡okrtyp©jkyb` # Get the lowercase Corpus alphabet
                                                                                                          pu) # Plus the uppercase Corpus alphabet
                                                                                                          i # Add Z at the end (index -1)





                                                                                                          share|improve this answer


























                                                                                                            1












                                                                                                            1








                                                                                                            1







                                                                                                            Japt, 37 bytes



                                                                                                            ;®i`…ypetjkŠkp¡okrtyp©jkyb`pu)gCpu bZ


                                                                                                            Try it online!



                                                                                                            The above link includes most test cases, but I haven't been able to input the second to last one as a string because it contains both single and double quotes. Here is that test case, input as an array of characters instead.



                                                                                                            Explanation:



                                                                                                            ;                                        #Set C to the lowercase alphabet
                                                                                                            ® #For each character Z of the input:
                                                                                                            bZ # Find its index in:
                                                                                                            C # The lowercase alphabet
                                                                                                            pu # Plus the uppercase alphabet
                                                                                                            # (-1 if it is not a letter)
                                                                                                            g # And get the character at that index in:
                                                                                                            `…ypetjkŠkp¡okrtyp©jkyb` # Get the lowercase Corpus alphabet
                                                                                                            pu) # Plus the uppercase Corpus alphabet
                                                                                                            i # Add Z at the end (index -1)





                                                                                                            share|improve this answer















                                                                                                            Japt, 37 bytes



                                                                                                            ;®i`…ypetjkŠkp¡okrtyp©jkyb`pu)gCpu bZ


                                                                                                            Try it online!



                                                                                                            The above link includes most test cases, but I haven't been able to input the second to last one as a string because it contains both single and double quotes. Here is that test case, input as an array of characters instead.



                                                                                                            Explanation:



                                                                                                            ;                                        #Set C to the lowercase alphabet
                                                                                                            ® #For each character Z of the input:
                                                                                                            bZ # Find its index in:
                                                                                                            C # The lowercase alphabet
                                                                                                            pu # Plus the uppercase alphabet
                                                                                                            # (-1 if it is not a letter)
                                                                                                            g # And get the character at that index in:
                                                                                                            `…ypetjkŠkp¡okrtyp©jkyb` # Get the lowercase Corpus alphabet
                                                                                                            pu) # Plus the uppercase Corpus alphabet
                                                                                                            i # Add Z at the end (index -1)






                                                                                                            share|improve this answer














                                                                                                            share|improve this answer



                                                                                                            share|improve this answer








                                                                                                            edited 3 hours ago

























                                                                                                            answered Dec 21 at 15:51









                                                                                                            Kamil Drakari

                                                                                                            2,971416




                                                                                                            2,971416























                                                                                                                0















                                                                                                                Python 2, 138 132 bytes





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                Actually shorter with a named function than with a lambda!



                                                                                                                lambda version, 138 bytes





                                                                                                                lambda i,a='bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',b='typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB':''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                131 125 if we are allowed to return an array of characters and have the join outside the function.





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return[(x,b[a.find(x)])[x in a]for x in i]


                                                                                                                Try it online!






                                                                                                                share|improve this answer



















                                                                                                                • 1




                                                                                                                  You can still use a lambda if you make a and b global variables
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 22:58










                                                                                                                • @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 22:59










                                                                                                                • Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 23:08












                                                                                                                • Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:09










                                                                                                                • Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:12
















                                                                                                                0















                                                                                                                Python 2, 138 132 bytes





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                Actually shorter with a named function than with a lambda!



                                                                                                                lambda version, 138 bytes





                                                                                                                lambda i,a='bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',b='typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB':''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                131 125 if we are allowed to return an array of characters and have the join outside the function.





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return[(x,b[a.find(x)])[x in a]for x in i]


                                                                                                                Try it online!






                                                                                                                share|improve this answer



















                                                                                                                • 1




                                                                                                                  You can still use a lambda if you make a and b global variables
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 22:58










                                                                                                                • @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 22:59










                                                                                                                • Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 23:08












                                                                                                                • Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:09










                                                                                                                • Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:12














                                                                                                                0












                                                                                                                0








                                                                                                                0







                                                                                                                Python 2, 138 132 bytes





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                Actually shorter with a named function than with a lambda!



                                                                                                                lambda version, 138 bytes





                                                                                                                lambda i,a='bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',b='typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB':''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                131 125 if we are allowed to return an array of characters and have the join outside the function.





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return[(x,b[a.find(x)])[x in a]for x in i]


                                                                                                                Try it online!






                                                                                                                share|improve this answer















                                                                                                                Python 2, 138 132 bytes





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                Actually shorter with a named function than with a lambda!



                                                                                                                lambda version, 138 bytes





                                                                                                                lambda i,a='bcdfghjlmnpqrstvwxzBCDFGHJLMNPQRSTVWXZ',b='typtjktpstkrtyptjkbTYPTJKTPSTKRTYPTJKB':''.join((x,b[a.find(x)])[x in a]for x in i)


                                                                                                                Try it online!



                                                                                                                131 125 if we are allowed to return an array of characters and have the join outside the function.





                                                                                                                def f(i,a='bcdfghjlmnpqrstvwxz',b='typtjktpstkrtyptjkb'):a+=a.upper();b+=b.upper();return[(x,b[a.find(x)])[x in a]for x in i]


                                                                                                                Try it online!







                                                                                                                share|improve this answer














                                                                                                                share|improve this answer



                                                                                                                share|improve this answer








                                                                                                                edited Dec 20 at 22:57

























                                                                                                                answered Dec 20 at 21:17









                                                                                                                ElPedro

                                                                                                                3,4631023




                                                                                                                3,4631023








                                                                                                                • 1




                                                                                                                  You can still use a lambda if you make a and b global variables
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 22:58










                                                                                                                • @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 22:59










                                                                                                                • Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 23:08












                                                                                                                • Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:09










                                                                                                                • Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:12














                                                                                                                • 1




                                                                                                                  You can still use a lambda if you make a and b global variables
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 22:58










                                                                                                                • @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 22:59










                                                                                                                • Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                  – Black Owl Kai
                                                                                                                  Dec 20 at 23:08












                                                                                                                • Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:09










                                                                                                                • Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                  – ElPedro
                                                                                                                  Dec 20 at 23:12








                                                                                                                1




                                                                                                                1




                                                                                                                You can still use a lambda if you make a and b global variables
                                                                                                                – Black Owl Kai
                                                                                                                Dec 20 at 22:58




                                                                                                                You can still use a lambda if you make a and b global variables
                                                                                                                – Black Owl Kai
                                                                                                                Dec 20 at 22:58












                                                                                                                @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 22:59




                                                                                                                @BlackOwlKai - Thanks. Have been playing with that idea but it's getting late. Maybe tomorrow :)
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 22:59












                                                                                                                Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                – Black Owl Kai
                                                                                                                Dec 20 at 23:08






                                                                                                                Got it down to 120/113 characters (TIO without the testcases, else the link would be too long for a comment)
                                                                                                                – Black Owl Kai
                                                                                                                Dec 20 at 23:08














                                                                                                                Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 23:09




                                                                                                                Beats mine and different enough for you to post as your own answer. I'll upvote :)
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 23:09












                                                                                                                Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 23:12




                                                                                                                Feel free to steal my test cases as well. They took longer to type in than the code...
                                                                                                                – ElPedro
                                                                                                                Dec 20 at 23:12











                                                                                                                0















                                                                                                                PHP, 100 bytes



                                                                                                                Code



                                                                                                                <?=strtr($argv[0],($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u),($v=typtjktkpstkrtyptjkyb).$f($v));


                                                                                                                Try it online!



                                                                                                                Explanation



                                                                                                                # using the provided character mapping given on the question, as an array
                                                                                                                strtr($argv[0], # strtr for the string replacement
                                                                                                                ($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u), # Taking onthe the keys for the first string
                                                                                                                ($v=typtjktkpstkrtyptjkyb).$f($v)); # Using the values for second string
                                                                                                                # In both Strings appending the upper version of each string.





                                                                                                                share|improve this answer


























                                                                                                                  0















                                                                                                                  PHP, 100 bytes



                                                                                                                  Code



                                                                                                                  <?=strtr($argv[0],($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u),($v=typtjktkpstkrtyptjkyb).$f($v));


                                                                                                                  Try it online!



                                                                                                                  Explanation



                                                                                                                  # using the provided character mapping given on the question, as an array
                                                                                                                  strtr($argv[0], # strtr for the string replacement
                                                                                                                  ($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u), # Taking onthe the keys for the first string
                                                                                                                  ($v=typtjktkpstkrtyptjkyb).$f($v)); # Using the values for second string
                                                                                                                  # In both Strings appending the upper version of each string.





                                                                                                                  share|improve this answer
























                                                                                                                    0












                                                                                                                    0








                                                                                                                    0







                                                                                                                    PHP, 100 bytes



                                                                                                                    Code



                                                                                                                    <?=strtr($argv[0],($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u),($v=typtjktkpstkrtyptjkyb).$f($v));


                                                                                                                    Try it online!



                                                                                                                    Explanation



                                                                                                                    # using the provided character mapping given on the question, as an array
                                                                                                                    strtr($argv[0], # strtr for the string replacement
                                                                                                                    ($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u), # Taking onthe the keys for the first string
                                                                                                                    ($v=typtjktkpstkrtyptjkyb).$f($v)); # Using the values for second string
                                                                                                                    # In both Strings appending the upper version of each string.





                                                                                                                    share|improve this answer













                                                                                                                    PHP, 100 bytes



                                                                                                                    Code



                                                                                                                    <?=strtr($argv[0],($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u),($v=typtjktkpstkrtyptjkyb).$f($v));


                                                                                                                    Try it online!



                                                                                                                    Explanation



                                                                                                                    # using the provided character mapping given on the question, as an array
                                                                                                                    strtr($argv[0], # strtr for the string replacement
                                                                                                                    ($u=bcdfghjklmnpqrstvwxyz).($f=strtoupper)($u), # Taking onthe the keys for the first string
                                                                                                                    ($v=typtjktkpstkrtyptjkyb).$f($v)); # Using the values for second string
                                                                                                                    # In both Strings appending the upper version of each string.






                                                                                                                    share|improve this answer












                                                                                                                    share|improve this answer



                                                                                                                    share|improve this answer










                                                                                                                    answered Dec 21 at 18:14









                                                                                                                    Francisco Hahn

                                                                                                                    4369




                                                                                                                    4369























                                                                                                                        0














                                                                                                                        Pyth, 35 Bytes



                                                                                                                        XQ.*m+r1dd[tG."byàHuH¯¹e?rJyfh


                                                                                                                        Try it!



                                                                                                                        Could probably use Left map or something to get rid of the two d's, but I couldn't figure out how.






                                                                                                                        share|improve this answer


























                                                                                                                          0














                                                                                                                          Pyth, 35 Bytes



                                                                                                                          XQ.*m+r1dd[tG."byàHuH¯¹e?rJyfh


                                                                                                                          Try it!



                                                                                                                          Could probably use Left map or something to get rid of the two d's, but I couldn't figure out how.






                                                                                                                          share|improve this answer
























                                                                                                                            0












                                                                                                                            0








                                                                                                                            0






                                                                                                                            Pyth, 35 Bytes



                                                                                                                            XQ.*m+r1dd[tG."byàHuH¯¹e?rJyfh


                                                                                                                            Try it!



                                                                                                                            Could probably use Left map or something to get rid of the two d's, but I couldn't figure out how.






                                                                                                                            share|improve this answer












                                                                                                                            Pyth, 35 Bytes



                                                                                                                            XQ.*m+r1dd[tG."byàHuH¯¹e?rJyfh


                                                                                                                            Try it!



                                                                                                                            Could probably use Left map or something to get rid of the two d's, but I couldn't figure out how.







                                                                                                                            share|improve this answer












                                                                                                                            share|improve this answer



                                                                                                                            share|improve this answer










                                                                                                                            answered Dec 21 at 20:00









                                                                                                                            KarlKastor

                                                                                                                            2,1871716




                                                                                                                            2,1871716























                                                                                                                                0














                                                                                                                                Java, 211 Bytes



                                                                                                                                a->{String b="BCDFGHJLMNPQRSTVWXZbcdfghjlmnpqrstvwxz",c="TYPTJKTPSTKRTYPTJKBtyptjktpstkrtyptjkb";a.chars().map(x->{int z;return(z=b.indexOf(x))>-1?c.toCharArray()[z]:x;}).forEach(x->System.out.print((char)x));};


                                                                                                                                Try it online!






                                                                                                                                share|improve this answer




























                                                                                                                                  0














                                                                                                                                  Java, 211 Bytes



                                                                                                                                  a->{String b="BCDFGHJLMNPQRSTVWXZbcdfghjlmnpqrstvwxz",c="TYPTJKTPSTKRTYPTJKBtyptjktpstkrtyptjkb";a.chars().map(x->{int z;return(z=b.indexOf(x))>-1?c.toCharArray()[z]:x;}).forEach(x->System.out.print((char)x));};


                                                                                                                                  Try it online!






                                                                                                                                  share|improve this answer


























                                                                                                                                    0












                                                                                                                                    0








                                                                                                                                    0






                                                                                                                                    Java, 211 Bytes



                                                                                                                                    a->{String b="BCDFGHJLMNPQRSTVWXZbcdfghjlmnpqrstvwxz",c="TYPTJKTPSTKRTYPTJKBtyptjktpstkrtyptjkb";a.chars().map(x->{int z;return(z=b.indexOf(x))>-1?c.toCharArray()[z]:x;}).forEach(x->System.out.print((char)x));};


                                                                                                                                    Try it online!






                                                                                                                                    share|improve this answer














                                                                                                                                    Java, 211 Bytes



                                                                                                                                    a->{String b="BCDFGHJLMNPQRSTVWXZbcdfghjlmnpqrstvwxz",c="TYPTJKTPSTKRTYPTJKBtyptjktpstkrtyptjkb";a.chars().map(x->{int z;return(z=b.indexOf(x))>-1?c.toCharArray()[z]:x;}).forEach(x->System.out.print((char)x));};


                                                                                                                                    Try it online!







                                                                                                                                    share|improve this answer














                                                                                                                                    share|improve this answer



                                                                                                                                    share|improve this answer








                                                                                                                                    edited Dec 21 at 21:11

























                                                                                                                                    answered Dec 21 at 21:06









                                                                                                                                    Hypino

                                                                                                                                    22116




                                                                                                                                    22116























                                                                                                                                        0














                                                                                                                                        Pyth, 34 chars



                                                                                                                                        J."byàHuH¯¹e?rJyfh"XXztGJrtG1rJ1


                                                                                                                                        Try it online!



                                                                                                                                        The string is a compressed version of "typetjkitkpstokrtyputjkyb". For some reason I cannot get Pyth to compress "atypetjkitkpstokrtyputjkyb" with the function


                                                                                                                                        +++.N++hSzeSzCi-RChSzCMz-hCeSzChSzN

                                                                                                                                        even though it would probably save a byte or two as the two t's could be eliminated.




                                                                                                                                        share|improve this answer








                                                                                                                                        New contributor




                                                                                                                                        Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                        Check out our Code of Conduct.























                                                                                                                                          0














                                                                                                                                          Pyth, 34 chars



                                                                                                                                          J."byàHuH¯¹e?rJyfh"XXztGJrtG1rJ1


                                                                                                                                          Try it online!



                                                                                                                                          The string is a compressed version of "typetjkitkpstokrtyputjkyb". For some reason I cannot get Pyth to compress "atypetjkitkpstokrtyputjkyb" with the function


                                                                                                                                          +++.N++hSzeSzCi-RChSzCMz-hCeSzChSzN

                                                                                                                                          even though it would probably save a byte or two as the two t's could be eliminated.




                                                                                                                                          share|improve this answer








                                                                                                                                          New contributor




                                                                                                                                          Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                          Check out our Code of Conduct.





















                                                                                                                                            0












                                                                                                                                            0








                                                                                                                                            0






                                                                                                                                            Pyth, 34 chars



                                                                                                                                            J."byàHuH¯¹e?rJyfh"XXztGJrtG1rJ1


                                                                                                                                            Try it online!



                                                                                                                                            The string is a compressed version of "typetjkitkpstokrtyputjkyb". For some reason I cannot get Pyth to compress "atypetjkitkpstokrtyputjkyb" with the function


                                                                                                                                            +++.N++hSzeSzCi-RChSzCMz-hCeSzChSzN

                                                                                                                                            even though it would probably save a byte or two as the two t's could be eliminated.




                                                                                                                                            share|improve this answer








                                                                                                                                            New contributor




                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.









                                                                                                                                            Pyth, 34 chars



                                                                                                                                            J."byàHuH¯¹e?rJyfh"XXztGJrtG1rJ1


                                                                                                                                            Try it online!



                                                                                                                                            The string is a compressed version of "typetjkitkpstokrtyputjkyb". For some reason I cannot get Pyth to compress "atypetjkitkpstokrtyputjkyb" with the function


                                                                                                                                            +++.N++hSzeSzCi-RChSzCMz-hCeSzChSzN

                                                                                                                                            even though it would probably save a byte or two as the two t's could be eliminated.





                                                                                                                                            share|improve this answer








                                                                                                                                            New contributor




                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.









                                                                                                                                            share|improve this answer



                                                                                                                                            share|improve this answer






                                                                                                                                            New contributor




                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.









                                                                                                                                            answered yesterday









                                                                                                                                            Lucas Bertocchini

                                                                                                                                            11




                                                                                                                                            11




                                                                                                                                            New contributor




                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.





                                                                                                                                            New contributor





                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.






                                                                                                                                            Lucas Bertocchini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                                                                                                            Check out our Code of Conduct.























                                                                                                                                                0















                                                                                                                                                Tcl, 114 bytes



                                                                                                                                                proc C s {string map [split {btcydpftgjhkjtlpmsntpkqrrtsytpvtwjxkzbBTCYDPFTGJHKJTLPMSNTPKQRRTSYTPVTWJXKZB} ""] $s}


                                                                                                                                                Try it online!






                                                                                                                                                share|improve this answer


























                                                                                                                                                  0















                                                                                                                                                  Tcl, 114 bytes



                                                                                                                                                  proc C s {string map [split {btcydpftgjhkjtlpmsntpkqrrtsytpvtwjxkzbBTCYDPFTGJHKJTLPMSNTPKQRRTSYTPVTWJXKZB} ""] $s}


                                                                                                                                                  Try it online!






                                                                                                                                                  share|improve this answer
























                                                                                                                                                    0












                                                                                                                                                    0








                                                                                                                                                    0







                                                                                                                                                    Tcl, 114 bytes



                                                                                                                                                    proc C s {string map [split {btcydpftgjhkjtlpmsntpkqrrtsytpvtwjxkzbBTCYDPFTGJHKJTLPMSNTPKQRRTSYTPVTWJXKZB} ""] $s}


                                                                                                                                                    Try it online!






                                                                                                                                                    share|improve this answer













                                                                                                                                                    Tcl, 114 bytes



                                                                                                                                                    proc C s {string map [split {btcydpftgjhkjtlpmsntpkqrrtsytpvtwjxkzbBTCYDPFTGJHKJTLPMSNTPKQRRTSYTPVTWJXKZB} ""] $s}


                                                                                                                                                    Try it online!







                                                                                                                                                    share|improve this answer












                                                                                                                                                    share|improve this answer



                                                                                                                                                    share|improve this answer










                                                                                                                                                    answered 10 hours ago









                                                                                                                                                    sergiol

                                                                                                                                                    2,4921925




                                                                                                                                                    2,4921925






























                                                                                                                                                        draft saved

                                                                                                                                                        draft discarded




















































                                                                                                                                                        If this is an answer to a challenge…




                                                                                                                                                        • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                                                                                        • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                                                                                          Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                                                                                        • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.



                                                                                                                                                        More generally…




                                                                                                                                                        • …Please make sure to answer the question and provide sufficient detail.


                                                                                                                                                        • …Avoid asking for help, clarification or responding to other answers (use comments instead).






                                                                                                                                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                                                                                                                        Please pay close attention to the following guidance:


                                                                                                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                                                                                                        But avoid



                                                                                                                                                        • Asking for help, clarification, or responding to other answers.

                                                                                                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                                                                                                        To learn more, see our tips on writing great answers.




                                                                                                                                                        draft saved


                                                                                                                                                        draft discarded














                                                                                                                                                        StackExchange.ready(
                                                                                                                                                        function () {
                                                                                                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f177866%2ftranslate-english-to-corpus%23new-answer', 'question_page');
                                                                                                                                                        }
                                                                                                                                                        );

                                                                                                                                                        Post as a guest















                                                                                                                                                        Required, but never shown





















































                                                                                                                                                        Required, but never shown














                                                                                                                                                        Required, but never shown












                                                                                                                                                        Required, but never shown







                                                                                                                                                        Required, but never shown

































                                                                                                                                                        Required, but never shown














                                                                                                                                                        Required, but never shown












                                                                                                                                                        Required, but never shown







                                                                                                                                                        Required, but never shown







                                                                                                                                                        Popular posts from this blog

                                                                                                                                                        Сан-Квентин

                                                                                                                                                        8-я гвардейская общевойсковая армия

                                                                                                                                                        Алькесар