2017 © Pedro Peláez
 

library cwin-app

PHP library for check spelling Indonesian language (Bahasa Indonesia)

image

cwin/cwin-app

PHP library for check spelling Indonesian language (Bahasa Indonesia)

  • Wednesday, January 27, 2016
  • by ridwanskaterock
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Cwin

Cwin (Correct Word Indonesian), (*1)

Author

Muhamad Ridwan ridwanskaterocks@gmail.com, (*2)

Spelling

Contohnya:, (*3)

  • indonesa => indonesia
  • mrdeka => merdeka
  • negri => negeri
  • membagun => membangun

Contoh kasus

Dalam penulisan kata kadangkala tidak pernah tertinggal dari typo atau salah ejaan untuk menghindari ketidaksesuaian dalam penulisan diperlukan pengecekan otomatis yang di lakukan untuk koreksi kata (check spelling), dan akan menampilkan suggestion kata yang dimaksud, (*4)

Instalasi

$ composer require cwin/cwin-app dev-master

Penggunaan

Copy kode berikut di directory project anda. Lalu jalankan file tersebut., (*5)

<?php 

require_once __DIR__ . '/vendor/autoload.php';

use Cwin\BasicWord\WordProcessing\Source\Indonesia\WordFactoryIndonesia;
use Cwin\BasicWord\WordProcessing\Source\English\WordFactoryEnglish;

$wordSpelling = new Cwin\BasicWord\WordSpelling(new WordFactoryIndonesia);
$suggestion = new Cwin\Component\Suggestion\Suggestion();

$checkSpelling = $wordSpelling->checkSpelling('indonesi sudah merdeka sejak tahunn empat lima');
$suggestion->setMaxListSuggestion(3);

foreach ($checkSpelling->spellingResult() as $spelling) {
    echo '<span '.$spelling->getBaseWord().' '.($spelling->hasError() ? 'class="error word"' : 'class="word"').'>' . $spelling->getWord() ;
    if($spelling->hasError()) {
        echo " <span class='suggest'>

  • ".implode("
  • ", $suggestion->setSpelling($spelling)->suggest())."
</span> " ; } echo '</span> '; }

Result, (*6)

The Versions

27/01 2016

dev-development

dev-development

PHP library for check spelling Indonesian language (Bahasa Indonesia)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Muhamad Ridwan

check indonesian kata dasar check spelling cek ejaan ejaan

25/11 2015

dev-master

9999999-dev

PHP library for check spelling Indonesian language (Bahasa Indonesia)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Muhamad Ridwan

check indonesian kata dasar check spelling cek ejaan ejaan

21/11 2015

dev-hotfix-suggestion

dev-hotfix-suggestion

PHP library for check spelling Indonesian language (Bahasa Indonesia)

  Sources   Download

The Requires

 

by Muhamad Ridwan

check indonesian kata dasar check spelling cek ejaan ejaan