Sorting PDF based on contents

Right now, I have a "inbox" folder. Hazel watches it, and then looks if it is a pdf and if the contents contain the word (for example) "dog". If it does, it moves it to the folder "/base/dog" ..
I'm basically duplicating this rule like 70 times for different keywords. So, "cat" goes to "/base/cat"
Is there a way to simplify this? I was thinking if hazel could get the list of folders in "/base/" and then use the results as an array of some sort to check the PDF contents? If a match is found, then move into that folder.
Make sense? How can I improve/create this kind of workflow?
Thanks!
I'm basically duplicating this rule like 70 times for different keywords. So, "cat" goes to "/base/cat"
Is there a way to simplify this? I was thinking if hazel could get the list of folders in "/base/" and then use the results as an array of some sort to check the PDF contents? If a match is found, then move into that folder.
Make sense? How can I improve/create this kind of workflow?
Thanks!