Documentation

GetPhoneticReading

Use case for converting text to phonetic representation.

Tags
since
3.0.0

Table of Contents

Properties

$repository  : LanguageRepositoryInterface

Methods

__construct()  : mixed
execute()  : string
Convert text to phonetic representation using MeCab (for Japanese).
getByCode()  : string
Convert text to phonetic representation by language code.
processMecabPhonetic()  : string
Process text through MeCab for phonetic reading.

Properties

Methods

execute()

Convert text to phonetic representation using MeCab (for Japanese).

public execute(string $text, int $id) : string
Parameters
$text : string

Text to be converted

$id : int

Language ID

Return values
string

Parsed text in phonetic format

getByCode()

Convert text to phonetic representation by language code.

public getByCode(string $text, string $lang) : string
Parameters
$text : string

Text to be converted

$lang : string

Language code (usually BCP 47 or ISO 639-1)

Return values
string

Parsed text in phonetic format

processMecabPhonetic()

Process text through MeCab for phonetic reading.

private processMecabPhonetic(string $text) : string
Parameters
$text : string

Text to process

Return values
string

Phonetic reading from MeCab


        
On this page

Search results