Extend Similarity with token type attribute

I wonder if it is possible to take in account the token type attribute for the similarity scoring.

For instance, if I search the token "cleaning" with the type "V", I want to get documents with token "cleaning" with the type "V" but also documents with token "cleaning" with the type "A" (but with a lower score).