News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Find and Correct Misspelled Words with Pspell
November 25, 2013 @ 11:23:55

On the SitePoint PHP blog there's a new tutorial talking about finding spelling errors in the input your user provides to your application. They use the powerful pspell functionality that can be compiled into PHP to run the checking.

Every one of us has made a spelling mistake in a Google search: "alternitive music", for example. In doing so, you may have noticed that Google was trying to help you by displaying: "Did you mean alternative music?". If your site has a search function, to indicate misspellings if no or too few results have been found is a very useful feature, especially if the bad English of a visitor can make you miss a sale. Fortunately, PHP's Pspell module allows for checking the spelling of a word and suggesting a replacement from its default dictionary (you can also create a custom dictionary).

He introduces the functionality through a simple function that takes in a string to check, sets up a new dictionary object and runs a pspell_suggest call to get spelling fix suggestions. He talks about the importance of the dictionary and, the modes you can use for checking (speed) and how to add a custom dictionary of your own.

0 comments voice your opinion now!
pspell misspelled words tutorial

Link: http://www.sitepoint.com/find-correct-misspelled-words-pspell/

Chris Shiflett's Blog:
Technical Vocabulary and Grammar
January 20, 2006 @ 06:50:51

It's not strictly PHP related, but Chris Shiflett has posted this new item on his blog today with a look at some technical vocabulary and grammar.

I sometimes wonder why people feel so compelled to use technical terms when talking about computers, even when they don't know what the terms mean. In my experience, those who know the least about a particular topic use the most complicated vocabulary when discussing it. I considered compiling a list of the popular ones, but since I'm lazy and have a blog, I decided to blog about it instead. Feel free to add to the list.

He mentions the incorrect use of the term "computer" when referring to hardware (overgeneralization), the confusion over very similar technical words (i.e. Orientated and Oriented, Depreciated and Deprecated), the pluralization of company names, and various other issues. Be sure to check out the comments for even more...

0 comments voice your opinion now!
technical vocabulary grammar pluralizing similar words overgeneralization technical vocabulary grammar pluralizing similar words overgeneralization


DevShed:
An Image is Worth a Thousand Words in PHP (Part 2)
December 22, 2005 @ 07:18:50

Devshed has posted the second part in their "An Image is Worth a Thousand Words in PHP" series today - this time working more with the content, characters, and colors.

We are about to pick up where we left off in part one, but first a quick summary of what we have done so far. We began by creating our conversion class and naming it 'img_to_txt'. Inside this class we defined several basic accessory methods, to allow our users a variety of options. Last, we also set up a method for returning the appropriate CSS markup based on the user's browser type.

That's what we've done so far - but there's a lot more to do, so let's get started.

They wrap up the series by showing how to change some of the colors (inlcuding the code for each color) and, finally, how to export it out to an image...

0 comments voice your opinion now!
image thousand words GD text export image thousand words GD text export


DevShed:
An Image is Worth a Thousand Words in PHP
December 15, 2005 @ 06:57:53

In this new article from DevShed today, there's a look at working with the GD libraries in PHP by doing some fun manipulation exercises (I love manipulation, don't you?)

This article, the first of two parts, describes a fun little project that will help you sharpen your image manipulation skills. The completed application takes an image and converts it to a string of text that resembles the original image. Brian Vaughn gets you started.

Sometimes programming is work, but sometimes' it's fun. Today we're going to work on a fun programming project involving image manipulation. This project will require that PHP be installed with the GD library (available at http://www.boutell.com/gd/, or bundled along with PHP 4.3 and later).

In this first part of the series, all they really do is help you get things set up - a working PHP intallation with GD integrated. They provide initial code for the manipulation class, but it doesn't do much of anything yet. I guess that'll have to wait for part two...

0 comments voice your opinion now!
image thousand words gd graphics manipulation image thousand words gd graphics manipulation



Community Events





Don't see your event here?
Let us know!


series tips laravel release framework library deployment list package symfony voicesoftheelephpant install introduction opinion bugfix language community podcast interview api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework