The most common way to determine a keyword’s intent is through the keyword itself. Some search queries carry modifiers that instantly tell you which of the four intent types that query belongs to.
For example, many information search queries take the form of questions, with modifiers like what is, why is, why will, where is, who is, and how does. Others have different modifiers, such as how to, guide to, X tutorial, etc. Navigational search queries usually have modifiers like login, contact, faq, training, directions, course, chrome extension, demo, academy, webinar, etc. before or after the branded name.
Because commercial search queries show that the user is trying to make a buying decision, they have modifiers like best, review, X vs Y, alternatives, comparison, SaaS, etc. And transactional search queries use modifiers like buy, get, rent, order, coupon, discount code, cheap, pricing, free trial, cost, and estimate.
While it’s easy to determine search intent this way, it’s not always reliable because not all search queries have modifiers.
For example, if you look up “bar” on Google, you’ll see that the SERP is a mix of articles about a place where drinks are sold, a long piece of wood, and the law profession.