承接 acidf0x/php-korean-handler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acidf0x/php-korean-handler

Composer 安装命令:

composer require acidf0x/php-korean-handler

包简介

PHP Korean Handler - Hangul Separator

README 文档

README

한글 자모 분리 라이브러리 (초성, 중성, 종성)

Installation

install using composer:

 composer require acidf0x/php-korean-handler

Usage

조회시 반환 값은 U+3130U+318F 사이의 Hangul Compatibility Jamo가 반환 됩니다.

use AcidF0x\KoreanHandler\Seperator; 

$separator = new Seperator();

$result = $separator->separate("수상하게 돈이 많은");
print_r($result->getSplitList()); // ["ㅅ","ㅜ","ㅅ","ㅏ","ㅇ","ㅎ","ㅏ","ㄱ","ㅔ","ㄷ","ㅗ","ㄴ","ㅇ","ㅣ","ㅁ","ㅏ","ㄶ","ㅇ","ㅡ","ㄴ"]
print_r($result->getChoseongList()); // ["ㅅ", "ㅅ", "ㅎ", "ㄱ", "ㄷ", "ㅇ", "ㅁ", "ㅇ"]
print_r($result->getJungseongList()); // ["ㅜ", "ㅏ", "ㅏ", "ㅔ", "ㅗ", "ㅣ", "ㅏ", "ㅡ"]
print_r($result->getJongseongList()); // ["ㅇ","ㄴ","ㄶ","ㄴ"]

separate 메서드의 리턴 값은 ArrayAccess, Iterator 인터페이스를 구현하였으므로 각 결과에 대해 Array처럼 접근 하여 사용이 가능합니다

$result = $this->separator->separate("황소");

$result[0]->getChoseong(); // ㅎ
$result[0]->getJungseong(); // ㅘ
$result[0]->getJongseong(); // ㅇ
$result[1]->getChoseong(); // ㅅ
$result[1]->getJungseong(); // ㅗ
$result[1]->getJongseong(); // null

$result[0]->getSplit(); // ["ㅎ", "ㅘ", "ㅇ"]


foreach ($result as $character) {
    $character->getChoseong();
}

统计信息

  • 总下载量: 120
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固