Rhymes talk:Czech

From Wiktionary, the free dictionary
Latest comment: 8 years ago by Dan Polansky in topic Script
Jump to navigation Jump to search

Script

[edit]

A little Python script for generating an index for disyllabic rhymes:

vowels = ['a', 'aː', 'ɛ', 'ɛː', 'ɪ', 'iː', 'o', 'oː', 'u', 'uː']
vowelsEnd = vowels[:]
vowelsEnd.append('ou̯')
consonants = ['b', 'ts', 'tʃ', 'tʃk', 'd', 'ɟ', 'f', 'g', 'ɦ', 'x', 'j', 'k',
 'l', 'lk', 'm', 'n', 'ɲ', 'p', 'r', 'r̝', 's', 'st', 'ʃ', 't', 'c', 'v', 'ks', 'z', 'ʒ' ]
consonants_with_bracket = ['b', 'ts (c)', 'tʃ (č)', 'tʃk (čk)', 'd', 'ɟ (ď)', 'f', 'g', 'ɦ (h)', 'x (ch)', 'j', 'k',
 'l', 'lk', 'm', 'n', 'ɲ (ň)', 'p', 'r', 'r̝ (ř)', 's', 'st', 'ʃ (š)', 't', 'c (ť)', 'v', 'ks (x)', 'z', 'ʒ (ž)' ]
print '{|'
for consonant, consonant_with_bracket in zip(consonants,consonants_with_bracket):
  # Print header line
  print '! '+consonant_with_bracket+'\n! '
  for vowel in vowelsEnd:
    print '! '+vowel
  print '|-'
  # Print content
  for vowel in vowels:
    print '! ' # Here we could print the consonant, but we don't.
    print '! '+vowel
    for vowel2 in vowelsEnd:
      rhyme = vowel + consonant + vowel2
      print '| [[Rhymes:Czech/'+rhyme+'|-'+rhyme+']]'
    print '|-'
print '|}'

Note the use of "r̝" rather than "r̝̊" for "ř", as it is between two vowels. --Dan Polansky 12:01, 15 February 2012 (UTC)Reply

Updated. --Dan Polansky (talk) 13:50, 11 May 2013 (UTC)Reply

Updated. --Dan Polansky (talk) 20:43, 12 May 2013 (UTC)Reply

Updated. --Dan Polansky (talk) 17:41, 15 May 2013 (UTC)Reply

Updated. --Dan Polansky (talk) 20:40, 15 May 2013 (UTC)Reply

Updated. --Dan Polansky (talk) 12:14, 22 December 2015 (UTC)Reply