RKG Logo 434-970-1010

About two and a half years ago, we released RKG Duck, an open-source tool that lets you use a Perl filter on the Windows Clipboard.

We previously discussed how one could use this tool to create AdGroups by filtering a list of keywords to cluster similar phrases together using a common signature. For each phrase, our filter removed stop words, took the stem of each word, alphabetized them, and crushed the stems together into a signature.

Today, we would like to introduce the RKG RegExp Duck Filter as an alternative method for creating and organizing AdGroups, using the words within the phrases themselves. Here’s what the filter looks like:

# regexp filter
# input from STDIN, output to STDOUT

use strict;

# Enter your word list pattern on the line below
# Example: …= “red|sony|camcorder”;
my $regexp = “<INSERT HERE>“;

{
my $i = 0;
my %sort_order = map {ucfirst lc $_ => $i++} split(/\|/, $regexp);

sub list_order {$sort_order{$a} <=> $sort_order{$b}};
}

while (<STDIN>) {
print join(”, sort list_order map {ucfirst lc} m/\b($regexp)\b/gi), “\n”;
}

# RKGDUCK
# documentation at www.rimmkaufman.com/duck

By modifying the filter in RKG Duck and defining the “$regexp” variable as a pipe-delimited regular expression (ex. “red|sony|camcorder”), any phrase containing “red” and/or “sony” and/or “camcorder” will be categorized as some variation of “RedSonyCamcorder” (ex. “RedCamcorder,” “SonyCamcorder,” etc.)

Additional descriptive words can be used in the regular expression but should be listed and grouped together to maintain naming consistency (ex. color-brand-product-accessory: “blue|red|sony|samsung|camera|camcorder|lens” instead of “blue|samsung|camera|lens |red|sony|camcorder” so that a blue Sony camera lens is categorized as “BlueSonyCameraLens” instead of “BlueCameraLensSony.”

Check out this sample spreadsheet to get a better idea of what you can expect and how to use the filter. Then, download ActiveState’s ActivePerl, RKG Duck and the Regexp filter today to try it out for yourself!

Note: Change the file extension of the filter to “.pl” before using it with RKG Duck.

This example is a demonstration of what one can do with RKG Duck. This isn’t how our firm builds AdGroups — we don’t recommend building out phrases then AdGrouping later. Rather, the right approach to build campaigns is to go through every relevant URL on the site; build out rich keywords for each URL; assign targeted copy, smart match types, and sensible initial bids; then adgroup them appropriately. As George mentioned, there’s significant benefit in databasing ads in a richer taxonomy than the simple Campaign >> AdGroup >> Term hierarchy. However, if you’ve taken over a badly managed program, this can be a useful way to right the ship fairly quickly.

Follow these links to learn more about regular expressions or CPAN modules to create your very own RKG Duck Filter!

If you like this post, consider subscribing to our RSS feed. You can also have new posts sent to you via email.


Related Posts

    No related posts.

Comments

  1. Gab Goldenberg, July 21, 2010:

    FYI, I’m pretty sure that Wordstream created a tool to do all this for you without the need for any reg ex wizardry.

    Yep, here it is:

    http://www.wordstream.com/keyword-grouper/

Your Comment

Tags

RKG

Trackback

http://www.rimmkaufman.com/rkgblog/2010/07/13/another-free-tool-to-cluster-ppc-phrases-into-related-adgroups-%e2%80%93-rkg-duck/trackback/

Blogs Citing This Post

  1. Pingback: Tweets that mention Another Free Tool to Cluster PPC Phrases Into Related AdGroups – RKG Duck: About two and a half years ago, we rele... -- Topsy.com on July 13, 2010

Email Updates

Categories

Recent Comments

  • George Michie: Thanks Adam, and your point is well taken. It is certainly worth pointing out that when the pendulum swings back to the middle the...
  • Adam Audette: Brilliant post, George. There’s something to be said for the ‘middle way’ to be sure, for dedication to what works...
  • George Michie: Billy, I’ve been predicting the death of Twitter for a long time. I try to keep those predictions to myself though, because I...
  • George Michie: Use the force, Luke, use the force! :-)
  • Siddharth Shah: Hi George, The paper chose books for a few reasons. This is what they say in the paper ” By focusing on books, we study a...
  • George Michie: Chad, thanks for the observations! Sid, the paper sounds interesting. I only read the abstract, but I wonder if they studied type of...
  • billy wolt: Hi George, this is the reason i have avoided twitter….the mob will move away soon. drop me an email, i want to pick your brain...
  • Siddharth Shah: Hi George, Your comment on retail reminded me of this paper I read a few months ago that investigated the online to offline...
  • Chad Summerhill: Hi George, sometime in my early 20’s I decided that if the mob was following something or doing something that I would be...
  • Chad Summerhill: No worries, I wouldn’t tell me either. But I’ve never been shy about asking smart people questions–has made a...
  • George Michie: Thanks Chad, I’ll answer these questions gladly…as soon as you come to work for us! :-) No question that the historical...
  • Chad Summerhill: Great post! Looks like I’ve got some work to do. Willing to share more about your bid-management predictive analytics?...
  • Chad Summerhill: Hi George, I would be honored. I’ll email you soon and we can talk about the details of the article. Thanks!
  • George Michie: Hi Chad, thanks for the link! If you’re willing to share the details I’d be delighted to do a feature at RKG Blog.
  • Chad Summerhill: Since I mentioned our in-house web analytics data warehouse earlier in the comments, I thought I would include a link to my new...

Blog Stats

  • Posts: 991
  • Words: 481,301
  • Comments: 3,360

Administration