CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\LanguageDetector\Detector Interface Reference

Interface for a language detector class. More...

+ Inheritance diagram for CirrusSearch\LanguageDetector\Detector:

Public Member Functions

 detect ( $text)
 Detect language.
 

Static Public Member Functions

static build (SearchConfig $config)
 

Detailed Description

Interface for a language detector class.

Member Function Documentation

◆ build()

static CirrusSearch\LanguageDetector\Detector::build ( SearchConfig $config)
static
Parameters
SearchConfig$config
Returns
Detector

Implemented in CirrusSearch\LanguageDetector\TextCat.

◆ detect()

CirrusSearch\LanguageDetector\Detector::detect ( $text)

Detect language.

Parameters
string$textText to detect language
Returns
string|null Preferred language, or null if none found

Implemented in CirrusSearch\LanguageDetector\TextCat.


The documentation for this interface was generated from the following file: