\Overtrue\PinyinFileDictLoader

Dict File loader.

Summary

Methods
Properties
Constants
__construct()
map()
mapSurname()
No public properties found
No constants found
No protected methods found
$segmentName
$path
N/A
No private methods found
No private properties found
N/A

Properties

$segmentName

$segmentName : string

Words segment name.

Type

string

$path

$path : string

Dict path.

Type

string

Methods

__construct()

__construct(string  $path) 

Constructor.

Parameters

string $path

map()

map(\Closure  $callback) 

Load dict.

[
    '响应时间' => "[\t]xiǎng[\t]yìng[\t]shí[\t]jiān",
    '长篇连载' => '[\t]cháng[\t]piān[\t]lián[\t]zǎi',
    //...
]

Parameters

\Closure $callback

mapSurname()

mapSurname(\Closure  $callback) 

Load surname dict.

Parameters

\Closure $callback