The item sorter is a good answer. Note: This will only work with items that can stack. I built a small version that only handles 2 different custom named items but could easily be scaled up to handle the 5 you want to use.
The item sorter I used requires two hoppers per sorter. A comparator measures the outputcontents of the first "filter" hopper that is specifically filled and this output allows the hopper underneath to take in items. This prevents the initialfilter hopper from emptying. This makes that hopper only accept the item of your choosing.
The contents of the custom filled "filter"filter hopper are a stack of 41 of the custom named paper and the(or whatever you want to filter through that can be stacked). The other 4 spotsslots are filled with another custom named item. I named In my example, the cobblestone filteris named "filter". These prevent the hopper from taking in anything in those slots.
Note: You can put a stack in the anvil and named the entire stack, saving experience points.
By using multiple sorters you can then determine which sorter took in an item and output a signal.
What I built is basic. It would require emptying the chest after the mechanism is used. A system could easily be built to send output pulses from each of the sections and not require the chest be emptied each time.
This would require another hopper before the chest. A comparator would output a pulse as the item passes through the hopper.
Edit: I forgot to mention, the filter hopper can not be pointed into the hopper below it. If you look at this last image you can see, I have pointed the filter hopper into the comparator. This is not required though, any direction but down in this case.