{"id":1993,"date":"2012-07-26T14:31:24","date_gmt":"2012-07-26T13:31:24","guid":{"rendered":"http:\/\/www.maratz.com\/blog\/?p=1993"},"modified":"2013-01-16T16:00:07","modified_gmt":"2013-01-16T15:00:07","slug":"article-readability-stats-with-php","status":"publish","type":"post","link":"http:\/\/www.maratz.com\/blog\/archives\/2012\/07\/26\/article-readability-stats-with-php\/","title":{"rendered":"Article readability stats with PHP"},"content":{"rendered":"<p>With so many technology innovations (mobility, sci-fi screen resolutions) and the attention span shorter than a wing flap of a hummingbird, we are forced to rediscover new ways of optimizing texts for better understanding and ease of use. One common way is the technical improvement of typography, another way is measuring readability. Readability is basically a text usability, and usability is always best improved with proper data to support it.<\/p>\n<p>We had been investigating a couple of options about how to mathematically describe and evaluate texts for our recent project and as a result we developed a simple <abbr>PHP<\/abbr> function that renders some handy content info, such as the number of characters, syllables, words and sentences for each article. Long story short, we are now using it as a standard tool for creating more detailed content audit and to categorize individual articles \u2014 as well as site sections \u2014 according to target audience age and educational background. <\/p>\n<p>Measuring \u2014 and most of all, understanding \u2014 that there was a significant number of overly complicated articles on the site helped us to pinpoint the critical parts, suggest copy improvements and allocate the editorial resources.<\/p>\n<p>It\u2019s interesting that the people outside our industry have been using such methods for years. Some public services, for instance The U.S. Department of Defense use the Reading Ease test as the standard test of readability for its documents and forms. Us, web designers are sometimes too arrogant or just plain ignorant about the latest advances in other fields. If we simply reach out and use the wisdom of others, more often than not we can immediately expand our own palette. But I digress.<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Automated_Readability_Index\">Automated Readability Index<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Flesch-Kincaid_Readability_Test\">Flesch\u2013Kincaid readability test<\/a> are some of the most popular methodologies of qualifying texts in English, but there are <a href=\"http:\/\/www.ideosity.com\/ideosphere\/seo-information\/readability-tests\">many more readability tests<\/a> including those for Spanish, Dutch, Japanese etc. It was surprising to discover how some of those could help in education to create better learning materials for students&#8230;<\/p>\n<p>Even though we are using it with WordPress, the function can be used with any <abbr>PHP<\/abbr> based <abbr>CMS<\/abbr>. Keep in mind that it uses algorithms to evaluate texts in English only. If you plan to use it for measurements in other languages, make sure to adjust the formula accordingly. Please do try to improve the code and let me know your results.<\/p>\n<p><strong><a href=\"\/downloads\/cn-article-readability.txt\">Download cn-article-readability.php<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With so many technology innovations (mobility, sci-fi screen resolutions) and the attention span shorter than a wing flap of a hummingbird, we are forced to rediscover new ways of optimizing texts for better understanding and ease of use. One common way is the technical improvement of typography, another way is measuring readability. Readability is basically [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[79,33],"_links":{"self":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/1993"}],"collection":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/comments?post=1993"}],"version-history":[{"count":0,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/1993\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/media?parent=1993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/categories?post=1993"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/tags?post=1993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}