Oh, within Buddhism, there are six base-sense media, not just five. There is also the pattern-recognition sense base media dedicated to detecting ideas.
Nibbedhika Sutta: Penetrative
"And what is the cause by which perception comes into play? Contact is the cause by which perception comes into play.
"And what is the diversity in perception? Perception with regard to forms is one thing, perception with regard to sounds is another, perception with regard to aromas is another, perception with regard to flavors is another, perception with regard to tactile sensations is another, perception with regard to ideas is another. This is called the diversity in perception.
"And what is the result of perception? Perception has expression as its result, I tell you. However a person perceives something, that is how he expresses it: 'I have this sort of perception.' This is called the result of perception.