Logical queries for ambiguous tokens