PHPackages                             pear/text\_languagedetect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pear/text\_languagedetect

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

pear/text\_languagedetect
=========================

Identify human languages from text samples

v1.0.2(3y ago)54279.1k↓44.6%192BSD-2-ClausePHP

Since Mar 2Pushed 5mo ago15 watchersCompare

[ Source](https://github.com/pear/Text_LanguageDetect)[ Packagist](https://packagist.org/packages/pear/text_languagedetect)[ Docs](http://pear.php.net/package/Text_LanguageDetect)[ RSS](/packages/pear-text-languagedetect/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (2)

Text\_LanguageDetect
====================

[](#text_languagedetect)

PHP library to identify human languages from text samples. Returns confidence scores for each.

Installation
------------

[](#installation)

### PEAR

[](#pear)

```
$ pear install Text_LanguageDetect
```

### Composer

[](#composer)

```
$ composer require pear/text_languagedetect
```

Usage
-----

[](#usage)

Also see the examples in the `docs/` directory and the [official documentation](http://pear.php.net/package/Text_LanguageDetect/docs).

### Language detection

[](#language-detection)

Simple language detection:

```

```

### Language code

[](#language-code)

Instead of returning the full language name, ISO 639-2 two and three letter codes can be returned:

```

```

Supported languages
-------------------

[](#supported-languages)

- albanian
- arabic
- azeri
- bengali
- bulgarian
- cebuano
- croatian
- czech
- danish
- dutch
- english
- estonian
- farsi
- finnish
- french
- german
- hausa
- hawaiian
- hindi
- hungarian
- icelandic
- indonesian
- italian
- kazakh
- kyrgyz
- latin
- latvian
- lithuanian
- macedonian
- mongolian
- nepali
- norwegian
- pashto
- pidgin
- polish
- portuguese
- romanian
- russian
- serbian
- slovak
- slovene
- somali
- spanish
- swahili
- swedish
- tagalog
- turkish
- ukrainian
- urdu
- uzbek
- vietnamese
- welsh

Links
-----

[](#links)

Homepage[http://pear.php.net/package/Text\_LanguageDetect](http://pear.php.net/package/Text_LanguageDetect)Bug tracker[http://pear.php.net/bugs/search.php?cmd=display&amp;package\_name\[\]=Text\_LanguageDetect](http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Text_LanguageDetect)Documentation[http://pear.php.net/package/Text\_LanguageDetect/docs](http://pear.php.net/package/Text_LanguageDetect/docs)Unit test status[https://travis-ci.org/pear/Text\_LanguageDetect](https://travis-ci.org/pear/Text_LanguageDetect)

[![https://travis-ci.org/pear/Text_LanguageDetect.svg?branch=master](https://camo.githubusercontent.com/bd69de3c5ae9ad5625adca462b1ce8fd597cc0146f5e55a7d85514cbfbdee26a/68747470733a2f2f7472617669732d63692e6f72672f706561722f546578745f4c616e67756167654465746563742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pear/Text_LanguageDetect)Notes
-----

[](#notes)

Where are the data from?

> I don't recall where I got the original data set. It's just the frequencies of 3-letter combinations in each supported language. It could be generated from a few random wikipedia pages from each language.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance50

Moderate activity, may be stable

Popularity49

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1094 days

Total

3

Last Release

1223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1323714f58f9144af310e5e4217e61b96ad7c42bc5c93a1f2d97deca95f6f4f8?d=identicon)[ashnazg](/maintainers/ashnazg)

![](https://www.gravatar.com/avatar/a1a2e6fe03f91204de2117430a748a12db2957eb113d4a50fc86d68d3c851e11?d=identicon)[cweiske](/maintainers/cweiske)

---

Top Contributors

[![cweiske](https://avatars.githubusercontent.com/u/59036?v=4)](https://github.com/cweiske "cweiske (51 commits)")[![ashnazg](https://avatars.githubusercontent.com/u/100170?v=4)](https://github.com/ashnazg "ashnazg (8 commits)")[![CloCkWeRX](https://avatars.githubusercontent.com/u/365751?v=4)](https://github.com/CloCkWeRX "CloCkWeRX (4 commits)")[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (3 commits)")[![khaperets](https://avatars.githubusercontent.com/u/2507262?v=4)](https://github.com/khaperets "khaperets (2 commits)")

---

Tags

detect-languagelanguagesphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pear-text-languagedetect/health.svg)

```
[![Health](https://phpackages.com/badges/pear-text-languagedetect/health.svg)](https://phpackages.com/packages/pear-text-languagedetect)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
