Documentation

LemmatizerManager

Manages lemmatizer instantiation and NLP availability checks.

Tags
since
3.0.0

Table of Contents

Properties

$lemmatizer  : LemmatizerInterface

Methods

__construct()  : mixed
Constructor.
getAllNlpLanguages()  : array<string|int, string>
Get all languages potentially supported by NLP (including uninstalled models).
getAvailableLanguages()  : array<string|int, string>
Get all languages with available lemmatization support.
getLemmatizerByType()  : LemmatizerInterface
Get a lemmatizer by type.
getLemmatizerForLanguage()  : LemmatizerInterface
Get the best available lemmatizer for a language.
getNlpSupportedLanguages()  : array<string|int, string>
Get languages supported by the NLP service.
isAvailableForLanguage()  : bool
Check if lemmatization is available for a language.
isNlpServiceAvailable()  : bool
Check if NLP service (spaCy) is available.

Properties

Methods

getAllNlpLanguages()

Get all languages potentially supported by NLP (including uninstalled models).

public getAllNlpLanguages() : array<string|int, string>
Return values
array<string|int, string>

getAvailableLanguages()

Get all languages with available lemmatization support.

public getAvailableLanguages() : array<string|int, string>
Return values
array<string|int, string>

Array of language codes

getLemmatizerForLanguage()

Get the best available lemmatizer for a language.

public getLemmatizerForLanguage(string $languageCode) : LemmatizerInterface

Uses the LemmatizerFactory to select the appropriate lemmatizer based on language configuration and availability.

Parameters
$languageCode : string

ISO language code

Return values
LemmatizerInterface

getNlpSupportedLanguages()

Get languages supported by the NLP service.

public getNlpSupportedLanguages() : array<string|int, string>
Return values
array<string|int, string>

isAvailableForLanguage()

Check if lemmatization is available for a language.

public isAvailableForLanguage(string $languageCode) : bool
Parameters
$languageCode : string

ISO language code

Return values
bool

True if lemmatization is available

isNlpServiceAvailable()

Check if NLP service (spaCy) is available.

public isNlpServiceAvailable() : bool
Return values
bool

        
On this page

Search results