Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Googleapis Python genai Sphinx BaseStemmer

From Leeroopedia
Knowledge Sources
Domains Documentation, Text_Processing
Last Updated 2026-02-15 14:00 GMT

Overview

Concrete tool for base stemming algorithm infrastructure used by the Sphinx documentation search engine.

Description

The BaseStemmer class provides the core stemming algorithm framework used by language-specific stemmers in the Sphinx documentation system. It implements string manipulation methods (setCurrent, getCurrent), character group testing (in_grouping, out_grouping with forward/backward variants), pattern matching (find_among, find_among_b), and slice manipulation (replace_s, slice_from, slice_del). This is a Sphinx documentation asset, not part of the GenAI SDK itself.

Usage

This JavaScript file is loaded by the Sphinx documentation site to enable client-side full-text search with stemming support.

Code Reference

Source Location

Signature

var BaseStemmer = function() {
    this.setCurrent = function(value) { ... };
    this.getCurrent = function() { ... };
    this.in_grouping = function(s, min, max) { ... };
    this.find_among = function(v) { ... };
    this.find_among_b = function(v) { ... };
    this.replace_s = function(c_bra, c_ket, s) { ... };
    this.slice_from = function(s) { ... };
    this.eq_s = function(s) { ... };
};

Import

<script src="_static/base-stemmer.js"></script>

I/O Contract

Inputs

Name Type Required Description
value string Yes (setCurrent) Word to stem

Outputs

Name Type Description
getCurrent() string Stemmed word result

Usage Examples

// Used internally by language-specific stemmers
var stemmer = new EnglishStemmer();  // extends BaseStemmer
stemmer.setCurrent("running");
stemmer.stem();
var result = stemmer.getCurrent();  // "run"

Related Pages

(No SDK environment or heuristic dependencies - documentation asset only)

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment