Package spoonerism :: Module finnish_phonetics
[hide private]
[frames] | no frames]

Module finnish_phonetics

Created on Aug 15, 2011


Author: santtu:

   //////////////// NOTE TO STUDENTS ///////////////////////
   // You don't have to understand the source code of this 
   // module if you don't want to.
   /////////////////////////////////////////////////////////

Functions [hide private]
 
is_letter(symbol)
Determines if the given symbol is used as a standard letter (either a consonant or a vowel) in the Finnish language.
 
is_vowel(symbol)
Determines if the given symbol represents a vowel sound in Finnish.
 
is_consonant(symbol)
Determines if the given symbol represents a consonant sound in Finnish.
 
is_assimilating_back_vowel(symbol)
Determines if the given symbol represents, in Finnish, an "assimilating back vowel".
 
is_assimilating_front_vowel(symbol)
Determines if the given symbol represents, in Finnish, an "assimilating front vowel".
 
to_back(symbol)
If the given symbol represents an assimilating front vowel, returns a symbol representing the corresponding back vowel.
 
to_front(symbol)
If the given symbol represents an assimilating back vowel, returns a symbol representing the corresponding front vowel.
Variables [hide private]
  FINNISH_VOWELS = u'aeiouyäöå'
  FINNISH_CONSONANTS = u'bcdfghjklmnpqrstvwxz'
  ASSIMILATING_BACK_VOWELS = u'aou'
  ASSIMILATING_FRONT_VOWELS = u'äöy'
  __package__ = None
Function Details [hide private]

is_letter(symbol)

 

Determines if the given symbol is used as a standard letter (either a consonant or a vowel) in the Finnish language.

Parameters:
  • symbol - the symbol tested
Returns:
a boolean value indicating if the given symbol is letter of the Finnish alphabet

is_vowel(symbol)

 

Determines if the given symbol represents a vowel sound in Finnish. Vowels in Finnish are: a, e, i, o, u, y, ä, ö, å.

Parameters:
  • symbol - the symbol tested
Returns:
a boolean value indicating if the given symbol represents a vowel in Finnish
See Also:
#is_consonant(char), #is_letter(char)

is_consonant(symbol)

 

Determines if the given symbol represents a consonant sound in Finnish. Any letter that does not represent a vowel is considered a consonant.

Parameters:
  • symbol - the symbol tested
Returns:
a boolean value indicating if the given symbol is a consonant in Finnish
See Also:
#is_vowel(char), #is_letter(char)

is_assimilating_back_vowel(symbol)

 

Determines if the given symbol represents, in Finnish, an "assimilating back vowel". An assimilating back vowel, here, is defined as a back vowel which has a corresponding front vowel and which can trigger or be targeted by vowel-harmony-related assimilations. In other words, this method determines if the given symbol is one of: a, o, u.

Parameters:
  • symbol - the symbol tested
Returns:
a boolean value indicating if the given symbol represents an assimilating back vowel

is_assimilating_front_vowel(symbol)

 

Determines if the given symbol represents, in Finnish, an "assimilating front vowel". An assimilating front vowel, here, is defined as a front vowel which has a corresponding back vowel and can trigger or be targeted by vowel-harmony-related assimilations. In other words, this method determines if the given symbol is one of: ä, ö, y.

Parameters:
  • symbol - the symbol tested
Returns:
a boolean value indicating if the given symbol represents an assimilating front vowel

to_back(symbol)

 

If the given symbol represents an assimilating front vowel, returns a symbol representing the corresponding back vowel. If not, returns the given symbol itself. Finnish front vowels 'ä', 'ö' and 'y' correspond to the back vowels 'a', 'o' and 'u', respectively.

Parameters:
  • symbol - a symbol
Returns:
A back vowel corresponding to the given front vowel, or the given symbol itself if it doesn't represent an "assimilating front vowel".

See Also: #is_assimilating_front_vowel(char)

to_front(symbol)

 

If the given symbol represents an assimilating back vowel, returns a symbol representing the corresponding front vowel. If not, returns the given symbol itself. Finnish front vowels 'a', 'o' and 'u' correspond to the front vowels 'ä', 'ö' and 'y', respectively.

Parameters:
  • symbol - a symbol
Returns:
A front vowel corresponding to the given back vowel, or the given symbol itself if it doesn't represent an "assimilating back vowel".

See Also: #is_assimilating_back_vowel(char)