Goal: leave the highest volume search terms alone, and pull out lower volume terms that are a 'close match'.
Script allows User to input into a web page a list of search terms AND search volume, and a list of special plural words.
(e.g. see [login to view URL] for text box method)
For a given search term, script needs to pull out other terms that are plurals or singulars, or that are contained within the given term,
(or singulars and plural versions that are contained within a given term),
provided their search volume is lower, and add them to the same row of the given term.
Sample Input:
Alice Mens Costumes 500
Alice Costume 300
Alice in Wonderland Mens Costumes 200
Alice Mens 100
Alice Outfits 600
Alice in Wonderland Outfits 300
Pirate Outfit for Kid 500
Pirate Outfits Kids 300
Sample Input of Special Plural Words:
mens
costumes
kids
outfits
Required Program Output to screen:
Alice Mens Costumes, 500, Alice Costume, Alice Mens
Alice in Wonderland Mens Costumes, 200
Alice Outfits, 600
Alice in Wonderland Outfits, 300
Pirate Outfit for Kid, 500, Pirate Outfits Kids
Notes: Alice in Wonderland Mens Costumes is NOT pulled because not EVERY word
is contained in the other strings. And no substrings are pulled against it because it's search volume is lower
than all the others so it 'loses'.
Pirate Outfits Kids is pulled, because Outfits and Kids were inputted as plural words to watch out for, so you'll find that
Pirate, singular of Outfit, and Singular of Kid are all found within Pirate Outfit for Kids.
In other words if every word, when considering both the plural and singular version, is found within another term with
higher volume, you pull the lower volume term and put it next to the higher term.
User should be able to paste search terms in one text box, volume in another, and plural terms in a third, as per the above link.
You probably don't need this, but I wrote out and attached the logic for the code - i dont know php but
you should understand it.