Rune Caster 1.0.0
Modern C++ Text Processing Framework
Loading...
Searching...
No Matches
rune_caster::spell::language::GraphemeToPhoneme Class Reference

Grapheme-to-Phoneme conversion spell using C++20 concepts. More...

#include <spell_language.hpp>

Inheritance diagram for rune_caster::spell::language::GraphemeToPhoneme:
Collaboration diagram for rune_caster::spell::language::GraphemeToPhoneme:

Public Types

using input_type = RuneSequence
using output_type = RuneSequence
Public Types inherited from rune_caster::spell_base< RuneSequence >
using input_type
using output_type

Public Member Functions

 GraphemeToPhoneme (rune_caster::language::Code language)
 Construct a G2P converter for a specific language.
RuneSequence operator() (const RuneSequence &input) const override
 Apply the spell transformation.
std::string description () const override
 Get the spell's description.
std::string name () const override
 Get the spell's name.
rune_caster::language::Code target_language () const noexcept
 Get the target language of this converter.
Public Member Functions inherited from rune_caster::spell_base< RuneSequence >
virtual ~spell_base ()=default

Additional Inherited Members

Static Public Member Functions inherited from rune_caster::spell_base< RuneSequence >
static constexpr bool can_process () noexcept
 Check if this spell can be applied to the given input type (C++20 concepts)
static constexpr bool produces () noexcept
 Check if this spell produces the expected output type (C++20 concepts)
static constexpr const char * input_type_name () noexcept
 Get input type name as compile-time string (C++20)
static constexpr const char * output_type_name () noexcept
 Get output type name as compile-time string (C++20)

Detailed Description

Grapheme-to-Phoneme conversion spell using C++20 concepts.

Converts textual representation to phonetic representation. This is a placeholder for language-specific G2P systems.

Different languages require different phonetic conversion rules, so this spell is configured with a target language.

Definition at line 55 of file spell_language.hpp.

Member Typedef Documentation

◆ input_type

◆ output_type

Constructor & Destructor Documentation

◆ GraphemeToPhoneme()

rune_caster::spell::language::GraphemeToPhoneme::GraphemeToPhoneme ( rune_caster::language::Code language)
explicit

Construct a G2P converter for a specific language.

Parameters
languageThe target language for phonetic conversion

Member Function Documentation

◆ description()

std::string rune_caster::spell::language::GraphemeToPhoneme::description ( ) const
overridevirtual

Get the spell's description.

Returns
A human-readable description of what the spell does

Implements rune_caster::spell_base< RuneSequence >.

◆ name()

std::string rune_caster::spell::language::GraphemeToPhoneme::name ( ) const
inlineoverridevirtual

Get the spell's name.

Returns
A string identifying the spell

Implements rune_caster::spell_base< RuneSequence >.

Definition at line 71 of file spell_language.hpp.

◆ operator()()

RuneSequence rune_caster::spell::language::GraphemeToPhoneme::operator() ( const RuneSequence & input) const
overridevirtual

Apply the spell transformation.

Parameters
inputThe input data to transform
Returns
The transformed output

Implements rune_caster::spell_base< RuneSequence >.

◆ target_language()

rune_caster::language::Code rune_caster::spell::language::GraphemeToPhoneme::target_language ( ) const
inlinenoexcept

Get the target language of this converter.

Returns
The language code

Definition at line 77 of file spell_language.hpp.


The documentation for this class was generated from the following file: