{"id":33435,"date":"2026-11-14T20:53:43","date_gmt":"2026-11-14T19:53:43","guid":{"rendered":"https:\/\/wooacademy.sk\/?p=33435"},"modified":"2026-11-14T20:53:43","modified_gmt":"2026-11-14T19:53:43","slug":"stemming-vs-lemmatization-ecommerce-search","status":"publish","type":"post","link":"https:\/\/wooacademy.sk\/en\/stemming-vs-lemmatization-ecommerce-search\/","title":{"rendered":"Stemming vs lemmatization: why your store misses other word forms"},"content":{"rendered":"\n<p><strong>Stemming chops the ending off a word and keeps the stem (chargers, charging, charged \u2192 charg). Lemmatization finds the dictionary base form (chargers \u2192 charger, ran \u2192 run).<\/strong> Both make search find a product regardless of the number, case or tense the shopper uses. Stemming is fast and simple; lemmatization is more accurate but needs a dictionary and more computation.<\/p>\n\n<h2>Why it matters more for Slovak and Czech stores than for English ones<\/h2>\n<p>English has a handful of endings (shoe, shoes). Slovak and Czech have seven cases, three genders and dozens of declension patterns. One noun commonly has more than ten forms. A shopper types &#8220;nab\u00edja\u010dky na mobil&#8221; (phone chargers), the product is called &#8220;Nab\u00edja\u010dka na mobil USB-C&#8221;. Without handling word forms, &#8220;nab\u00edja\u010dky&#8221; and &#8220;nab\u00edja\u010dka&#8221; are two different words to the computer.<\/p>\n<p>Default WordPress and WooCommerce search looks for text with an SQL LIKE condition. A partial string would match both, but the full word &#8220;nab\u00edja\u010dky&#8221; does not find a product that only has &#8220;nab\u00edja\u010dka&#8221; in its title. In English the same happens with irregular plurals and with queries such as &#8220;batteries&#8221; against &#8220;battery&#8221;.<\/p>\n\n<h2>Stemming and lemmatization compared<\/h2>\n<table class=\"wa-tbl\">\n<thead><tr><th><\/th><th>Stemming<\/th><th>Lemmatization<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Principle<\/td><td>Rules chop off endings<\/td><td>Dictionary and morphological analysis return the base form<\/td><\/tr>\n<tr><td>Output<\/td><td>A stem, not necessarily a real word<\/td><td>A real word (lemma)<\/td><\/tr>\n<tr><td>Speed<\/td><td>Very fast<\/td><td>Slower<\/td><\/tr>\n<tr><td>Errors<\/td><td>Sometimes joins words that do not belong together or misses irregular forms<\/td><td>Fewer errors if the dictionary knows the word<\/td><\/tr>\n<tr><td>Best for<\/td><td>Real-time search, autocomplete<\/td><td>Text analysis, search engines with large budgets<\/td><\/tr>\n<\/tbody>\n<\/table>\n<p>The Stanford textbook Introduction to Information Retrieval describes it the same way: stemming is a crude heuristic that chops off the ends of words, lemmatization uses a vocabulary and morphological analysis to return the dictionary form.<\/p>\n\n<h2>Where stemming goes wrong and how to work around it<\/h2>\n<ul>\n<li><strong>Over-stemming.<\/strong> &#8220;Universe&#8221; and &#8220;university&#8221; can end up with the same stem. The fix is a cautious stemmer that only removes common endings, plus ranking that prefers exact matches.<\/li>\n<li><strong>Irregular forms.<\/strong> &#8220;Mouse&#8221; and &#8220;mice&#8221; are not joined by a stemmer. In a store this is rare, and when it happens <a href=\"https:\/\/wooacademy.sk\/en\/woocommerce-search-synonyms\/\">search synonyms<\/a> help.<\/li>\n<li><strong>Brands and codes.<\/strong> &#8220;Adidas&#8221; must not lose its &#8220;s&#8221;. Short words, numbers and codes should stay unchanged.<\/li>\n<\/ul>\n\n<h2>How wooacademy search 1.0.3 handles it<\/h2>\n<p>In the plugin I chose a <strong>light stemmer for Slovak and Czech<\/strong>. The reason is speed: the stemmer runs on every keystroke in <a href=\"https:\/\/wooacademy.sk\/en\/woocommerce-search-autocomplete-typeahead\/\">autocomplete<\/a> and with thousands of products the result must arrive within a few milliseconds.<\/p>\n<ul>\n<li>During indexing, words from the title, description, categories and attributes lose their diacritics and are reduced to a stem.<\/li>\n<li>The query is processed the same way, so &#8220;nab\u00edja\u010dky&#8221;, &#8220;nab\u00edja\u010dkou&#8221; and &#8220;nabijacka&#8221; meet at the same stem.<\/li>\n<li>Short words and words containing digits are left unchanged.<\/li>\n<li>An exact match weighs more than a stem match in ranking. More on how the order is built in the article on <a href=\"https:\/\/wooacademy.sk\/en\/woocommerce-search-relevance-tf-idf-bm25-boosting\/\">search relevance<\/a>.<\/li>\n<li><a href=\"https:\/\/wooacademy.sk\/en\/woocommerce-fuzzy-search-typos\/\">Typo tolerance<\/a> runs on top of the stemmer, so it also copes with a missing letter.<\/li>\n<\/ul>\n<div class=\"wa-cta\" style=\"border:1px solid #d9e2ec;border-radius:10px;padding:18px 22px;margin:28px 0;background:#f5f8fb\">\n<p style=\"margin:0 0 8px\"><strong>Search that understands Slovak and Czech<\/strong><\/p>\n<p style=\"margin:0 0 10px\">wooacademy search 1.0.3 finds products regardless of case, diacritics and small typos. It ranks results by match, sales and stock.<\/p>\n<p style=\"margin:0\"><a href=\"https:\/\/wooacademy.sk\/konzultacie\/\"><strong>I want this search on my store<\/strong><\/a> \u00b7 annual licence for 1 domain \u20ac249, done-for-you setup \u20ac499<\/p>\n<\/div>\n\n<h2>How to tell whether word forms cost you results<\/h2>\n<p>Search for five products in the plural and in another grammatical case. If the results differ noticeably from a search in the base form, your search does not join word forms. In the <a href=\"https:\/\/wooacademy.sk\/en\/woocommerce-zero-results-search-analytics\/\">search terms report<\/a> you will then see exactly these queries among zero results.<\/p>\n\n<h2>Frequently asked questions<\/h2>\n<details><summary><strong>Is lemmatization always better than stemming?<\/strong><\/summary><p>For text analysis yes, for store search not necessarily. Stemming is faster, and for product titles the accuracy difference is small when ranking prefers exact matches.<\/p><\/details>\n<details><summary><strong>Does the stemmer work for English?<\/strong><\/summary><p>The wooacademy search stemmer is built for Slovak and Czech. English stores benefit mainly from typo tolerance, synonyms and ranking.<\/p><\/details>\n<details><summary><strong>Do I have to rewrite product titles because of stemming?<\/strong><\/summary><p>No. Word forms are handled in the search index, the texts on your site stay unchanged.<\/p><\/details>\n<details><summary><strong>What are stop words and are they related to stemming?<\/strong><\/summary><p>Stop words are very common words (a, the, for) that search ignores or gives little weight in ranking. It is a different text processing step, done at the same stage.<\/p><\/details>\n<p style=\"margin-top:32px;font-size:.95em;color:#555\">Author: <a href=\"https:\/\/wooacademy.sk\/milan-frano-wordpress-a-seo-skolenia\/\">Milan Fra\u0148o<\/a>, wooacademy.sk. I build WooCommerce stores, tracking setups and SEO. I developed the wooacademy search plugin for stores that want good search without paying a monthly fee to an external service.<\/p>\n\n<!-- wp:themify-builder\/canvas \/-->","protected":false},"excerpt":{"rendered":"<p>Stemming chops off endings, lemmatization finds the dictionary form. In inflected languages like Slovak and Czech, search without one of them misses other cases.<\/p>\n","protected":false},"author":2,"featured_media":33384,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[698,839],"tags":[828],"class_list":["post-33435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wooacademy-pluginy-en","category-online-marketing","tag-seo-doktor","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"builder_content":"","_links":{"self":[{"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/posts\/33435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/comments?post=33435"}],"version-history":[{"count":2,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/posts\/33435\/revisions"}],"predecessor-version":[{"id":33437,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/posts\/33435\/revisions\/33437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/media\/33384"}],"wp:attachment":[{"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/media?parent=33435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/categories?post=33435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wooacademy.sk\/en\/wp-json\/wp\/v2\/tags?post=33435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}