{"id":40,"date":"2020-01-31T03:37:11","date_gmt":"2020-01-31T03:37:11","guid":{"rendered":"https:\/\/cebucodesolutions.com\/blog\/?p=40"},"modified":"2020-01-31T03:37:11","modified_gmt":"2020-01-31T03:37:11","slug":"php-spellchecker-library","status":"publish","type":"post","link":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/","title":{"rendered":"PHP Spellchecker Library"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"519\" src=\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png\" alt=\"\" class=\"wp-image-41\" srcset=\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png 1024w, https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-300x152.png 300w, https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-768x389.png 768w, https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1200x608.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> PHP Spellchecker is a library providing a way to spellcheck multiple  sources of text by many spellcheckers. The library provides an  abstraction layer with a unified interface for various spellcheckers  with support for the following out of the box: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/aspell.html\">Aspell<\/a> <\/li><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/hunspell.html\">Hunspell<\/a> <\/li><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/ispell.html\">Ispell<\/a> <\/li><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/php-pspell.html\">PHP Pspell<\/a> <\/li><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/languagetools.html\">LanguageTools<\/a><\/li><li><a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/docs\/spellcheckers\/multispellchecker.html\">MultiSpellchecker<\/a> <\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"> Here\u2019s a quick example from the documentation using the Aspell spellchecker: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nuse PhpSpellcheck\\SpellChecker\\Aspell;\n\n\/\/ if you made the default aspell installation on you local machine\n$aspell = Aspell::create();\n\n$misspellings = $aspell->check('mispell', ['en_US'], ['from_example']);\n\nforeach ($misspellings as $misspelling) {\n    $misspelling->getWord(); \/\/ 'mispell'\n    $misspelling->getLineNumber(); \/\/ '1'\n    $misspelling->getOffset(); \/\/ '0'\n    $misspelling->getSuggestions(); \/\/ ['misspell', ...]\n    $misspelling->getContext(); \/\/ ['from_example']\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"> Here\u2019s an example from the documentation for checking spelling in a file: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/\/ spellchecking a file\n$misspellings = $aspell->check(new File('path\/to\/file.txt'), ['en_US'], ['from_file']);\nforeach ($misspellings as $misspelling) {\n    $misspelling->getWord();\n    $misspelling->getLineNumber();\n    $misspelling->getOffset();\n    $misspelling->getSuggestions();\n    $misspelling->getContext();\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\nBe sure to check out the <a href=\"https:\/\/tigitz.github.io\/php-spellchecker\/\">PHP-Spellchecker Documentation<\/a> for complete details on installation and usage. You can check out the source code on GitHub at <a href=\"https:\/\/github.com\/tigitz\/php-spellchecker\">tigitz\/php-spellchecker<\/a>.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP Spellchecker is a library providing a way to spellcheck multiple sources of text by many spellcheckers. The library provides an abstraction layer with a unified interface for various spellcheckers with support for the following out of the box: Aspell Hunspell Ispell PHP Pspell LanguageTools MultiSpellchecker Here\u2019s a quick example from the documentation using the &hellip; <a href=\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PHP Spellchecker Library&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-updates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Spellchecker Library - Web Development Blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Spellchecker Library - Web Development Blogs\" \/>\n<meta property=\"og:description\" content=\"PHP Spellchecker is a library providing a way to spellcheck multiple sources of text by many spellcheckers. The library provides an abstraction layer with a unified interface for various spellcheckers with support for the following out of the box: Aspell Hunspell Ispell PHP Pspell LanguageTools MultiSpellchecker Here\u2019s a quick example from the documentation using the &hellip; Continue reading &quot;PHP Spellchecker Library&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-31T03:37:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\",\"url\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\",\"name\":\"PHP Spellchecker Library - Web Development Blogs\",\"isPartOf\":{\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png\",\"datePublished\":\"2020-01-31T03:37:11+00:00\",\"dateModified\":\"2020-01-31T03:37:11+00:00\",\"author\":{\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/094505f311153db12b4f0185cdef52fa\"},\"breadcrumb\":{\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage\",\"url\":\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured.png\",\"contentUrl\":\"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured.png\",\"width\":2220,\"height\":1125},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cebucodesolutions.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Spellchecker Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/#website\",\"url\":\"https:\/\/cebucodesolutions.com\/blog\/\",\"name\":\"Web Development Blogs\",\"description\":\"Daily updates of latest tricks\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cebucodesolutions.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/094505f311153db12b4f0185cdef52fa\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/58f32b4c3c414f0630b2359b5bb9b668a8d670e7e163fbc227f4f5611acacdbc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/58f32b4c3c414f0630b2359b5bb9b668a8d670e7e163fbc227f4f5611acacdbc?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/cebucodesolutions.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Spellchecker Library - Web Development Blogs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/","og_locale":"en_US","og_type":"article","og_title":"PHP Spellchecker Library - Web Development Blogs","og_description":"PHP Spellchecker is a library providing a way to spellcheck multiple sources of text by many spellcheckers. The library provides an abstraction layer with a unified interface for various spellcheckers with support for the following out of the box: Aspell Hunspell Ispell PHP Pspell LanguageTools MultiSpellchecker Here\u2019s a quick example from the documentation using the &hellip; Continue reading \"PHP Spellchecker Library\"","og_url":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/","og_site_name":"Web Development Blogs","article_published_time":"2020-01-31T03:37:11+00:00","og_image":[{"url":"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/","url":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/","name":"PHP Spellchecker Library - Web Development Blogs","isPartOf":{"@id":"https:\/\/cebucodesolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage"},"image":{"@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage"},"thumbnailUrl":"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured-1024x519.png","datePublished":"2020-01-31T03:37:11+00:00","dateModified":"2020-01-31T03:37:11+00:00","author":{"@id":"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/094505f311153db12b4f0185cdef52fa"},"breadcrumb":{"@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#primaryimage","url":"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured.png","contentUrl":"https:\/\/cebucodesolutions.com\/blog\/wp-content\/uploads\/2020\/01\/php-spellchecker-featured.png","width":2220,"height":1125},{"@type":"BreadcrumbList","@id":"https:\/\/cebucodesolutions.com\/blog\/2020\/01\/31\/php-spellchecker-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cebucodesolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP Spellchecker Library"}]},{"@type":"WebSite","@id":"https:\/\/cebucodesolutions.com\/blog\/#website","url":"https:\/\/cebucodesolutions.com\/blog\/","name":"Web Development Blogs","description":"Daily updates of latest tricks","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cebucodesolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/094505f311153db12b4f0185cdef52fa","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cebucodesolutions.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/58f32b4c3c414f0630b2359b5bb9b668a8d670e7e163fbc227f4f5611acacdbc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58f32b4c3c414f0630b2359b5bb9b668a8d670e7e163fbc227f4f5611acacdbc?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/cebucodesolutions.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":1,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cebucodesolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}