class WordMage::IPA::Utils

Defined in:

IPA/ipa.cr

Class Method Summary

Class Method Detail

def self.find_phoneme(symbol : String) : Phoneme | Nil #

Finds a phoneme by its symbol in the BasicPhonemes collection


[View source]
def self.is_vowel?(phoneme : String) : Bool #

[View source]
def self.resolve_phoneme(input : String | Phoneme) : Phoneme | Nil #

Resolves a string or Phoneme to a Phoneme instance

If a string is provided, looks it up in BasicPhonemes

If a Phoneme is provided, returns it as-is


[View source]
def self.resolve_phoneme!(input : String | Phoneme) : Phoneme #

Resolves a string or Phoneme to a Phoneme instance, raising if not found


[View source]
def self.resolve_phonemes(inputs : Array(String | Phoneme)) : Array(Phoneme | Nil) #

Resolves an array of strings/Phonemes to an array of Phoneme instances


[View source]
def self.resolve_phonemes!(inputs : Array(String | Phoneme)) : Array(Phoneme) #

Resolves an array of strings/Phonemes to an array of Phoneme instances, raising if any not found


[View source]