สร้างเรื่องไร้สาระที่ออกเสียงได้คำศัพท์


15

งานของคุณคือการสร้างคำไร้สาระที่ออกเสียงได้อย่างสมเหตุสมผลด้วย 'พยางค์' ตามจำนวนที่ระบุ ทุกครั้งที่มีการเรียกใช้โปรแกรมอาจส่งผลให้เกิดคำไร้สาระที่แตกต่างกัน

Pronounceability

คำที่ออกเสียงประกอบด้วยพยางค์ซึ่งประกอบด้วยกลุ่มเสียงสระที่อาจคั่นกลางระหว่างพยัญชนะสองกลุ่ม เสียงบางอย่างอาจไม่สามารถออกเสียงได้ในทุกตำแหน่งและเนื่องจากขึ้นอยู่กับภาษาเราจะใช้รูปแบบที่ผู้พูดภาษาอังกฤษเข้าใจได้

การเริ่มต้นกลุ่มพยัญชนะ:

ข c d f g h j k l ม n p r s t v w y z bl br ch cl cr dr fl gh gl gn gr kn ph ph พีอาร์ qu qu sh sh sk sl เอสเอ็มเอสทีเอสทีเอสทีเอช wr wr sch sch shm shr squ str thr thr

กลุ่มเสียงสระ:

e e o o ae ai ao au ea ee ei eu ia ie io oa oe oi oo oo ou ue ui ui

สิ้นสุดพยัญชนะกลุ่ม:

bcdfglmnprstxz bt ch ck ct ft gh gn lb ld lf lk lp lt rt mb mn mp nk ng nt ph pt rb rc rd rg rk rl rm rn rp rt rv rz r sk r เอสเอส rth sch tch

การรวมพยางค์

ทั้งกลุ่มเริ่มต้นและกลุ่มพยัญชนะเป็นตัวเลือกโดยทั่วไปอย่างไรก็ตามคุณไม่สามารถวางพยางค์ที่ลงท้ายด้วยสระได้ทันทีก่อนที่จะเริ่มด้วยสระ

คำปฏิเสธ

เพื่อความสะดวกในการใช้คำที่เรียบง่ายคำภาษาอังกฤษบางคำไม่สามารถสร้างขึ้นได้ด้วยวิธีนี้เช่นสุญญากาศระนาดเมมโมนิคพเตโรแดกติลสวยงาม blah พวกเขาว้าวและพหูพจน์ส่วนใหญ่

ภาพรวม

รูปแบบพยางค์ที่เป็นไปได้โดยใช้คีย์นี้:

(SC) = เริ่มต้นพยัญชนะ; (V) = กลุ่มเสียงสระ (EC) = สิ้นสุดพยัญชนะ

สำหรับหนึ่งพยางค์:

  • (SC) (V) (EC)
  • (V) (EC)
  • (SC) (V)
  • (V)

มีสองพยางค์:

  • (SC) (V) (EC) (SC) (V) (EC)
  • (SC) (V) (EC) (SC) (V)
  • (SC) (V) (EC) (V) (EC)
  • (SC) (V) (EC) (V)

  • (SC) (V) (SC) (V) (EC)

  • (SC) (V) (SC) (V)

  • (V) (EC) (SC) (V) (EC)

  • (V) (EC) (SC) (V)
  • (V) (EC) (V) (EC)
  • (V) (EC) (V)

  • (V) (SC) (V) (EC)

  • (V) (SC) (V)

... และต่อไป

ตัวอย่าง

1 พยางค์

  • charst
  • Tigh
  • shriegn
  • eess
  • Shue
  • อู
  • cheezz

2 พยางค์

  • jazzcrap
  • whylprog
  • การรับประทานอาหาร
  • umba
  • Ola
  • มี
  • ingsoc
  • greespheurz
  • bleuspoo

3 พยางค์

  • brokiompic
  • squirdshlicker
  • เมืองหลวง
  • opengtrass
  • doublethink
  • พี่ชาย
  • phoebliaptmoo
  • skolfblauquent

4 พยางค์

  • strawishoepick
  • patchworkzombie
  • prearneajoomie
  • slephotoschou
  • doubleplusgood

การเข้ารหัส

อินพุต: จำนวนเต็มสำหรับจำนวนพยางค์ที่จะสร้าง

เอาท์พุท: คำที่ไร้สาระ (อาจ) ที่หลายพยางค์มีความยาว

กฎระเบียบ

  • จำเป็นต้องใช้การสุ่ม (psuedo) รูปแบบบางอย่าง การรวมกันของพยางค์ควรเป็นไปได้ (ในทางทฤษฎี) ที่เป็นไปได้ในการสร้างแม้ว่าการกระจายไม่จำเป็นต้องเหมือนกัน
    • คุณอาจคิดว่าเครื่องกำเนิดของคุณเป็นแบบ aperiodic ดังนั้นจึงไม่จำเป็นต้องสร้างทางคณิตศาสตร์ทุกคำที่เป็นไปได้ (อาจมีระยะเวลาไม่นานพอในความเป็นจริง) และคุณไม่จำเป็นต้องแสดงหลักฐานใด ๆ เครื่องกำเนิดไฟฟ้าสามารถผลิตทุกคำที่เป็นไปได้
    • เครื่องมือสร้างของคุณจะต้องสามารถสร้างค่าที่แตกต่างกันอย่างน้อย 255 ค่าดังนั้นคุณจะไม่สามารถคืนค่าได้ 4ทุกครั้งที่มีการเรียกตัวสร้าง
    • สิ่งที่สำคัญที่สุดก็คือคุณจะต้องรวมกลุ่มตัวอักษรทั้งหมดข้างต้นในรหัสของคุณว่ากลุ่มตัวอักษรแต่ละกลุ่มมีความน่าจะเป็นแบบไม่เลือกศูนย์และรูปแบบพยางค์แต่ละตัวมีความน่าจะเป็นแบบไม่เป็นศูนย์
  • คุณต้องสนับสนุนพยางค์ไม่เกิน 16 คำ
  • นอกจากกฎการรวมพยางค์แล้วคำที่ส่งออกจะต้องไม่มี:
    • 3 สระติดต่อกัน ( a e i o uซึ่งสามารถเกิดขึ้นได้สำหรับquคำ)
    • 3 พยัญชนะที่ตรงกันกัน

โชคดี!


โปรดทราบว่าสิ่งนี้แตกต่างจากการสร้างคำที่ออกเสียงเนื่องจากเหตุผลสองสามประการ:

  • จำนวนตัวแปรของพยางค์ที่ระบุโดยอินพุตมากกว่าข้อกำหนด 10 ตัวอักษรที่เข้มงวด
  • ความท้าทายนี้จะเพิ่มกลุ่มตัวอักษรที่ไม่ครบถ้วนซึ่งต้องมีการเข้ารหัส (อย่างชาญฉลาด) และอนุญาตให้มีพยางค์ที่หลากหลายมากขึ้นดังนั้นรหัสไม่สามารถคัดลอกจากการท้าทายอื่น ๆ ได้
  • Squirdshlicker ฉันต้องการพูดอีกหรือไม่

ฉันลืมที่จะล่อลวงเช็ค แต่มันกลับกลายเป็นว่ามันนำสิ่งใหม่มาสู่ตารางที่ไม่สำคัญ หลังจากทั้งหมดมีความท้าทายที่แตกต่างกันหลายร้อย Quine


2
"ฉันลืมตรวจดูด้วยซ้ำ แต่กลับกลายเป็นว่าสิ่งนี้นำมาซึ่งความใหม่ในตารางที่ไม่สำคัญ" มีคนยืนยันเรื่องนี้หรือไม่ ฉันรู้สึกเช่นนี้ไม่จริงเสมอ ...
Quintec

2
ต้องลงคะแนนสำหรับ "hardcodedness" จำนวนมากเนื่องจากพยัญชนะและสระยาว 3 รายการของคุณ
Stephen

1
แนะนำให้เพิ่ม doubleplusgood เป็นตัวอย่างเพื่อให้ตรงกับคุณภาพของความท้าทายนี้

1
ทำไมไม่ "squirds c hlicker"? ต้องเอาชนะ "จุดแข็ง" บนพยัญชนะติดต่อกัน :)
Punintended

คำตอบ:


4

JavaScript (ES6),  407  403 ไบต์

f=n=>/[aeiou]{3}|(.)\1\1/.test(s=(h=k=>k?(g=s=>p=s.match(/.[a-z]*/g)[Math.random()*99|0]||(s>x&&p?'':g(s)))(x+'lBrClCrDrFlFrGlGrHJKKnPlPrQuScScrShmShrSlSmSnSquStrThThrTrVWWhWrY')+g('AAeAiAoAuEEaEeEiEuIIaIeIoOOaOeOiOoOuUUeUi')+g(x+'tCkCtFtLbLchLdLfLkLlLmLnLpLshLtLthMbMnMpNgNkNtPtRbRcRchRdRfRgRkRlRmRnRpRshRstRtRthRvRzSsTchXZz')+h(k-1):'')(n,p=x='BCChDFGGhGnLMNPPhRSSchShSkSpStTZB').toLowerCase())?f(n):s

ลองออนไลน์!


คุณแน่ใจหรือว่า[^aeiou]{3}ถูกต้อง? จากคำว่า 'การจับคู่' และตัวอย่าง 3 พยางค์squirdshlickerที่มีrdshlฉันคิดว่า OP หมายถึงพยัญชนะ 3 ตัวที่อยู่ติดกัน (เช่นbbbไม่อนุญาต) แทนที่จะเป็นพยัญชนะ 3 ตัวที่อยู่ติดกัน
Kevin Cruijssen

2
@KevinCruijssen เมื่ออ่านความท้าทายครั้งที่สองฉันคิดว่ามีข้อสงสัยเล็กน้อยว่าการตีความของคุณถูกต้อง ดังนั้นฉันจึงปรับปรุงรหัสของฉันตาม
Arnauld

3

05AB1E , 237 234 230 228 ไบต์

.•O0¦"ÐD›ô:ΓF9—∊‘àÕGÌ•3LŽZв₂в×S£V[1U.µ\µTΩiY.•1θ₆Ω–¸‡ÊΔιÃмº³ô»ÝAïG3_@|å“₄bÒs₃l¬t©ïÙK:≠•3LŽII₂в×S£«Ω1U}XižM•·Áy&ŒGηΩ¼αŸKq•6вèJ•Λ1"•bS>£Ω¼0U}TΩiY.•E–æƵHl¨åñyBY±(ú,ā]JùË‚aEuŒ—[K³|C~ôÙŸ„#¼ÑûĀdš+¢zsÄΘä¹ÊÌ₅ôθ•3LŽAE₆в×S£«Ω1U}J}Dγ€g3‹P#

-2 ขอบคุณไบต์@MagicOctopusUrn

ลองมันออนไลน์หรือได้รับผลอีกไม่กี่

คำอธิบาย:

.•O0¦"ÐD›ô:ΓF9—∊‘àÕGÌ•
                  "# Push compressed string "bcdfglmnprstzchghgnphshskspstsch"
  3L               # Push list [1,2,3]
    ŽA;            # Push compressed integer 8997
       ₂в          # Converted to Base-26 as list: [13,8,1]
         ×         # Repeat the digits [1,2,3] that many times: ["1111111111111","22222222","3"]
          S        # Convert it to a list of flattened digits
           £       # Split the string into parts of that size
            V      # Pop and store this string-list in variable `Y`
[                  # Start an infinite loop:
 1U                #  Reset variable `X` to 1
                 #  Reset the counter_variable to 0
 \                 #  Discard the top of the stack (if any)
 µ                 #  Loop while the counter_variable is not equal to the (implicit) input:
  TΩi              #   If a random boolean is truthy:
     Y             #    Push the string-list we stored in variable `Y`
     .•1θ₆Ω–¸‡ÊΔιÃмº³ô»ÝAïG3_@|å“₄bÒsl¬t©ïÙK:≠•
                   #    Push compressed string "hjkvwyblbrclcrdrflfrglgrknplprquscslsmsnthtrwhwrscrshmshrsqustrthr"
       3L          #    Push list [1,2,3]
         ŽII       #    Push compressed integer 4608
            ₂в     #    Converted to Base-26 as list: [6,21,6]
              ×    #    Repeat the digits [1,2,3] that many times: ["111111","222222222222222222222","333333"]
               S   #    Convert it to a list of flattened digits
                £  #    Split the string into parts of that size
     «             #    Merge it with list `Y`
      Ω            #    Pop and push a random starting consonant group from this list
     1U            #    And set variable `X` to 1
    }              #   Close the if-statement
  Xi               #   If variable `X` is 1:
    žM             #    Push builtin string "aeiou"
      •·ÁyGηΩ¼αŸKq
                   #    Push compressed integer 13814931869773709280202935082102
        6в         #    Converted to Base-6 as list: [1,0,1,1,1,2,1,4,0,1,0,2,0,3,0,4,2,0,2,1,2,3,3,0,3,1,3,2,3,3,3,4,4,1,4,2,0,1,2,3,4]
          èJ       #    Index each into the string "aeiou", and join together: "aeaiaoaueaeeeieuiaieiooaoeoiooouueuiaeiou"
      •Λ1"•       "#    Push compressed integer 8388576
           b       #    Converted to binary: "11111111111111111100000"
            S>     #    Split into a list of digits, and each increased by 1
              £    #    Split the string into parts of that size
               Ω   #    Pop and push a random vowel group from this list
    ¼              #    Increase the counter_variable by 1
    0U             #    And then set variable `X` to 0
   }               #   Close the if-statement
  TΩi              #   If a random boolean is truthy:
     Y             #    Push the string-list we stored in variable `Y`
     .•E–æƵHl¨åñyBY±(ú,ā]JùË‚aEuŒ—[K³|C~ôÙŸ„#¼ÑûĀdš+¢zsÄΘä¹ÊÌ₅ôθ•
                   #    Push compressed string "xbtckctftlbldlflklllmlnlpltmbmnmpnkngntptrbrcrdrfrgrkrlrmrnrprtrvrzsszzlchlshlthrchrshrstrthtch"
       3L          #    Push list [1,2,3]
         ŽAE       #    Push compressed integer 2564
            ₆в     #    Converted to Base-36 as list: [1,35,8]
              ×    #    Repeat the digits [1,2,3] that many times: ["1","222...222","33333333"]
               S   #    Convert it to a list of flattened digits
                £  #    Split the string into parts of that size
     «             #    Merge it with list `Y`
      Ω            #    Pop and push a random ending consonant group from this list
     1U            #    And set variable `X` to 1
    }              #   Close the if-statement
  J                #   Join all strings on the stack together
 }D                #  After the while-loop: duplicate the resulting string
   γ               #  Split the copy into chunks, with adjacent characters that are
                   #  the same grouped together
    g             #  Get the length of each chunk
      3           #  Check for each length if it's smaller than 3
        P          #  Check if all are truthy by taking the product, and if it is:
         #         #   Stop the infinite loop
                   # (after which the string at the top of the stack is output implicitly)

ดูที่ส่วนปลายของฉัน 05AB1E นี้ (ส่วนวิธีการบีบอัดสตริงที่ไม่ได้เป็นส่วนหนึ่งของพจนานุกรม , จะบีบอัดจำนวนเต็มขนาดใหญ่ได้อย่างไรและวิธีการบีบอัดรายการจำนวนเต็ม? )เพื่อทำความเข้าใจวิธีการบีบอัดส่วนต่างๆ


1
นอกจากนี้ยังžM•ô#‰¦λu¢!¡°gU€•6BS<èJมีขนาดเล็กกว่า 4 .•!m1±P1Ÿ6ºZ dâ4∍m–G¢”ãÔ2g•(การแปลงฐาน 6 และการเปลี่ยนโดยใช้ built-in สำหรับ AEIOU) TIO ลิงก์ยาวเกินไป
Magic Octopus Urn

@MagicOctopusUrn ขอบคุณ! และบันทึก 2 žM•·Áy&ŒGηΩ¼αŸKq•6вèJไบต์มากขึ้นด้วย :) PS: คุณสามารถใช้ตัวย่อ URL เช่นtinyurl.comบน PPCG ซึ่งแตกต่างจาก SE อื่น ๆ ส่วนใหญ่ :)
Kevin Cruijssen

1

เยลลี่ 231 ไบต์

e€ØẹŒrḢƇ,ŒɠF>2Ẹ
“yŒʠT¬ḅɼṬɦṀUżGv¶æɲCĊQ>ṙȦẇɼṄ0IḤhDẋDċṀĊṪɗĖƇẊ;1JƒṾỊżỵhṖ8>Ȯ⁶]¦Qṭ|Ṛṇẹm⁵ØKƈBNɦÇȯ¢ṣḟPṇMʠ¬YėĊÇẒỊĿXJÑḷÞeȮȮɼ$ỴœeṂṠɲẓḊ⁺ċŻ⁽⁶Ẓ⁹<>#nẇṬ⁴\¤ÐṡḞF5ƙẇwḶȤYḍ¡¢~ṚⱮ-ṃƲ⁻Ṙ6ɱṬ?İẆḌỊþEØ»Ḳµe€ØẹIkḣ3)Z;€“squ“qu”$1¦
“ئµ£‘ḃ3$Xµ³Ð¡ḊFµ⁺wØ2$¿ịÇX€Fß¹Ñ?

ลองออนไลน์!

โปรแกรมเต็มรูปแบบที่รับอาร์กิวเมนต์เดี่ยวจำนวนของพยางค์ที่ต้องการ

คำอธิบาย

หลักของนี่คือสตริงพจนานุกรมที่บีบอัด 66 คำ หากคำเหล่านั้นแบ่งออกเป็นกลุ่มของพยัญชนะและสระและ 3 กลุ่มแรกที่ใช้สำหรับแต่ละคำพวกเขาจะสร้างกลุ่มเริ่มต้นสระและกลุ่มปลายทางที่ต้องการจากคำถาม ข้อยกเว้นคือquและsquเพราะพวกเขามีเสียงสระในดังนั้นสิ่งเหล่านี้จะถูกเพิ่มด้วยตนเอง รายการคำถูกสร้างขึ้นโดยอัลกอริทึมจากพจนานุกรม Jelly โดยใช้สคริปต์ Python หมายเหตุกลุ่มตัวอักษรบางกลุ่มถูกทำซ้ำ แต่คำถามอนุญาตให้ผลลัพธ์ไม่ได้แสดงถึงการรวมกันที่เป็นไปได้อย่างสม่ำเสมอ หากสิ่งนี้เป็นที่ต้องการมันจะตรงไปตรงมาที่จะทำให้แต่ละกลุ่มไม่ซ้ำกันในราคาสองไบต์ ( Q€)

ตัวช่วยลิงค์ 1: ตรวจสอบว่ามีสระมากกว่า 3 สระในหนึ่งแถวหรือมากกว่า 3 ตัวในแถวเดียวกัน
                | Sample input: branggag
e€Øẹ            | For each letter, is it a vowel? [0, 0, 1, 0, 0, 0, 1, 0]
    Œr          | Run-length encode [[0, 2], [1, 1], [0, 3], [1, 1], [0, 1]]
      ḢƇ        | Filter only those with true first value, popping first value [[1], [1]]
        ,       | Pair with
         Œɠ     | Run lengths of input [[[1], [1]], [1, 1, 1, 1, 2, 1, 1]
           F    | Flatten [1, 1, 1, 1, 1, 1, 2, 1, 1]
            >2  | Greater than 2 [0, 0, 0, 0, 0, 0, 0, 0, 0]
              Ẹ | Any 0
ตัวช่วยลิงค์ 2: สตริงสามกลุ่ม
“yŒʠ...þEØ»                          | Compressed string: shmooze gaolbird hailshot shriech waeful furze ghaut cruelness stealthier gneiss shoeshine wheelchair wring build priorship knosp spoilfive karst through coalpit teschenite schoolkid theurgic zabtieh skiamachies yirth snazzier slimnastics scripted smirch droskies strift blepharism chaulmoogra glegness scarf fratch clerk brank jarvey flourless vorpal grex nard plumb larn philter sorbo tractabilities parcel mart damp rearm back bast bag bant baba boll bad bap becap basal ban bail bare
           Ḳ                         | Split at spaces
            µ        )               | For each word: e.g. hailshot
             e€Øẹ                    |   Check whether each character is a vowel [0, 1, 1, 0, 0, 0, 1, 0]
                 I                   | Increments of this [1, 0, -1, 0, 0, 1, -1]
                  k                  |   Split word at truthy values of this [h, ai, lsh, o, t]
                   ḣ3                |   Take the first three [h, ai, lsh]
                      Z              | Transpose (so now have three lists, start consonants, vowels, end consonants)
                        €        $1¦ | For the first group
                       ; “squ“qu”    | Append squ and qu
ลิงค์หลัก
          µ³Ð¡                     | Repeat the following the input number of times, collecting results:
“ئµ£‘                             |   18, 5, 9, 2
      ḃ3$                          |   bijective base 3: [1,2,3],[1,2],[2,3],[2]
         X                         |   Take one at random
              Ḋ                    | Remove first item (which will be the input to the link because if the way С works
               F                   | Flatten; we now have e.g. [1,2,3,2,3,1,2,3,2]. This corresponds to SC V EC V EC AC V EC V
                µ⁺    ¿            | Do everything so far once and then repeat while:
                  wØ2$             |   The output contains two twos (i.e. vowel-vowel)
                       ịÇ          | Look these up in the previous link, so we now have a group of letter groups for each position
                         X€F       | Pick a random letter group for each position
                            ß¹Ñ?   | If helper link 1 is true, retry the whole of this link again. Otherwise implicitly output

1
อยากทราบคำอธิบาย แต่คุณแน่ใจหรือว่ามันถูกต้อง? ฉันรับเอาต์พุตgnuignaalfbiสำหรับอินพุต4แต่aaไม่ควรทำถ้าฉันเข้าใจความท้าทายอย่างถูกต้อง ส่วนการรวมของพยางค์ระบุว่า " ... แต่คุณไม่สามารถวางพยางค์ที่ลงท้ายด้วยสระได้ทันทีก่อนที่จะเริ่มด้วยสระ "
Kevin Cruijssen

@KevinCruijssen พลาดไป ตอนนี้ควรตอบสนองความต้องการที่เกินไป ขอบคุณที่ชี้ให้เห็น
นิคเคนเนดี

1
คำตอบที่ดีฉันชอบสตริงพจนานุกรมที่คุณใช้สร้างกลุ่มทั้งหมด แม้ว่าฉันไม่แน่ใจว่าทำไมพจนานุกรมของเยลลี่จึงมีคำเช่นshmooze gaolbird hailshot shriech waeful furze ghautนี้ฮ่าฮ่า xD พจนานุกรมของเยลลี่มีขนาดใหญ่ขนาดไหน?
Kevin Cruijssen

1
@KevinCruijssen ใหญ่ มีคำน้อยกว่า 645 ตัวอักษร 20453 คำและตัวอักษรขนาดใหญ่ 227845 คำ
Nick Kennedy

0

Python 2 , 522 510 bytes

from random import*
import re
c=choice
S,V,E=[map(str.lower,re.findall('[A-Z][a-z]*',x))for x in'BCDFGHJKLMNPRSTVWYZBlBrChClCrDrFlFrGhGlGnGrKnPhPlPrQuScShSkSlSmSnSpStThTrWhWrSchScrShmShrSquStrThr','AeAiAoAuEaEeEiEuIaIeIoOaOeOiOoOuUeUiAEIOU','BCDFGLMNPRSTXZBtChCkCtFtGhGnLbLdLfLkLlLmLnLpLtMbMnMpNkNgNtPhPtRbRcRdRfRgRkRlRmRnRpRtRvRzShSkSpSsStZzLchLshLthRchRshRstRthSchTch']
def f(n):w=c(['',c(S)]);exec"e=c(E);w+=c(V)[-(w[-1:]in V):]+c([c(S),e,e+c([x for x in S if x[0]*2!=e])])*(n>1);n-=1;"*n;return w+c(['',e])

ลองออนไลน์!


0

Pyth, 346 335 bytes

McG.u+NYr9,VHSlH1smjOgs@L"eaiou"jC" ¤E̽]¢¨¦l#"5,4 17*Vd,Og"bcdfghjklmnprstvwyzblbrchclcrdrflfrghglgngrknphplprquscshskslsmsnspstthtrwhwrschscrshmshrsqustrthr"[18 29 6)Og"bcdfglmnprstxzbtchckctftghgnlbldlflklllmlnlpltmbmnmpnkngntphptrbrcrdrfrgrkrlrmrnrprtrvrzshskspssstzzlchlshlthrchrshrstrthschtch"[13 43 8)tuaGO<W!eeG^,1Z2 2Q]1

ลองออนไลน์ได้ที่นี่


0

ทับทิม , 381 379 375 ไบต์

ใช้การจับคู่ regex ยุ่งเพื่อรับกลุ่มพยัญชนะ อาจจะปรับให้เหมาะสม

->n,w=?a..s='zzz',a=[1]{s=(1..n).map{a=[w.grep(/^([^aeiouq]|[bcfgp][lr]|s?ch|dr|gn|kn|ph|s?qu|s[ct]r?|sh[mr]?|th?r?|s[klmnp]|wh|wr|gh)$/)+(a[-1]?[p]:[]),w.grep(/^[aeiou]{,2}$/),w.grep(/^([^aeiouqhjkvwy]|[bcflnprs]t|ck|gh|gn|l[bdfk-np]|m[bnp]|nk|ng|ph|r[bcdfgk-npvz]|[lr]?[stc]h|s[kps]|zz|rst|[st]ch)$/)<<p].map(&:sample)}*''while s=~/[aeiou]{3}|(.)\1\1|aa|eo|ii|iu|u[aou]/;s}

ลองออนไลน์!

โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.