2017 © Pedro Peláez
 

library elasticsearch-langdetect-php

Langdetect namespace for Elasticsearch-PHP

image

sjaakmoes/elasticsearch-langdetect-php

Langdetect namespace for Elasticsearch-PHP

  • Wednesday, September 30, 2015
  • by Droeftoeter
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Elasticsearch Langdetect PHP Namespace

This module adds endpoints to the Elasticsearch-PHP library when you are using the elasticsearch-langdetect plugin., (*1)

Installation

This module can be installed with Composer. Add the elasticsearch-langdetect-php package to your composer.json file:, (*2)

{
    "require": {
        "sjaakmoes/elasticsearch-langdetect-php": "~1.0"
    }
}

After the module is installed through composer, we need to inject this module into the Elasticsearch-PHP library:, (*3)

$params = [
    'host'              => ['localhost:9200'],
    'customNamespaces'  => [
        'langdetect'    => 'Langdetect\LangdetectNamespace'
    ]
];
$client = new Elasticsearch\Client($params);

Use

Language detection:, (*4)

// Detect
$params = [
    'content'   => 'This is a sample text.'
];
$response = $client->langdetect()->detect($params);

The $response holds an array which looks like:, (*5)

Array
(
    [profile] => /langdetect/
    [languages] => Array
        (
            [0] => Array
                (
                    [language] => en
                    [probability] => 0.9999959428847
                )

        )

)

The Versions

30/09 2015

dev-master

9999999-dev https://github.com/Sjaakmoes/elasticsearch-langdetect-php

Langdetect namespace for Elasticsearch-PHP

  Sources   Download

MIT

The Requires

 

language search elasticsearch client languagedetect langdetect

30/09 2015

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/Sjaakmoes/elasticsearch-langdetect-php

Langdetect namespace for Elasticsearch-PHP

  Sources   Download

MIT

The Requires

 

language search elasticsearch client languagedetect langdetect

30/09 2015

1.0.0

1.0.0.0 https://github.com/Sjaakmoes/elasticsearch-langdetect-php

Langdetect namespace for Elasticsearch-PHP

  Sources   Download

MIT

The Requires

 

language search elasticsearch client languagedetect langdetect