Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "nlp/porter-stemmer/docs/types/index.d"

Index

Functions

Functions

Export assignment porterStemmer

  • porterStemmer(word: string): string
  • Extracts the stem of a given word.

    Parameters

    • word: string

      input word

    Returns string

    word stem

    Example

    var out = porterStemmer( 'walking' );
    // returns 'walk'

    Example

    var out = porterStemmer( 'walked' );
    // returns 'walk'

    Example

    var out = porterStemmer( 'walks' );
    // returns 'walk'

    Example

    var out = porterStemmer( 'worldwide' );
    // returns 'worldwid'

    Example

    var out = porterStemmer( '' );
    // returns ''