Keyword Categorisation for PPC Search Engine Marketing

sometimes it's strange that you never get to think about creating a solution for a manual task that you have to do, even though it would be totally easy to do.
such for me was building a tool that categorises keywords... i have probably categorised keywords manually for way too long, probably 10s of thousands of keywords. often i cut corners, often i would just wrap keywords into an ad group by the way that i generated them, running a quick sense check if the keywords are in the right place.

it turns out that the way that i was doing this was actually quite straight forward: i look at the keyword and decide, based on a few key phrases, what category i would map that keyword too. let's take an example. the company i (hypothetically) work for is an airline with the name paddyjet:

in short, there are rules in your mind that make you decide quite instantly where to put terms. these rules are:
so i wrote a little python script to categorise keywords based on your rules. click on the link to go to my website and get the file and also samples
it needs the list of keywords in a text file (default keywords.txt), a list of noise words to remove (default: noiseWords.txt - it is optional to provider content in this file, the file itself has to be there) and the categorisation rules file (default keywordCategories.txt). 
the rules file needs to be marked up and structured in an ordered way:
finally, anything that can't be categorised as 'unknown'.

at the end a file will be generated with three columns: the original keyword, the noise words removed and the category based on the rules. the default name of the file would be date-time stamped and look like: YYYYMMDD_HHMMSS_categorisedKeywords.txt

i hope this tool could be useful for some people in digital marketing who currently struggle to categorise thousands of keywords manually. contact me if you have any questions, i'm happy to help.

it's a very quick and dirty solution, so if you have problems, find bugs or would like more features, feel free to contact me.