Download the PHP package iamtime/uztext without Composer

On this page you can find all versions of the php package iamtime/uztext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uztext

uztext

Узбекский текст для поиска так, как его на самом деле набирают люди.

Установка

PHP 8.2+, расширение mbstring. Зависимостей нет.

Пример

Сначала сохраните Uztext::index(...) названий в отдельное поле. Потом ищите по Uztext::variants($q) в названиях и по Uztext::keys($q) в этом поле.

Отдельные части:

Примеры

Папка examples/ запускается без установки: php examples/basics.php.

Файл Что показывает
basics.php каждую часть отдельно: апострофы, алфавиты, раскладку, окончания
catalog-search.php поиск по каталогу в памяти, тот же, что меряет eval/evaluate.php
sqlite-search.php поиск в базе через PDO: поле search_keys и условия LIKE
laravel/HasUzbekSearch.php трейт для модели Eloquent: search_keys заполняется при сохранении, Product::search('ntktajy')

Своё слово можно проверить так: php examples/catalog-search.php кўйлаклар.

Тесты

Качество

Оценочный набор eval/dataset.php: 60 товаров магазина (русские, узбекские латиницей и кириллицей названия) и 390 запросов к ним. Запуск: php eval/evaluate.php.

Вид запроса Запросов uztext Поиск подстроки
Как в названии 74 100% 97%
Другой алфавит 45 100% 0%
С окончанием 47 100% 21%
Другой порядок слов 26 100% 0%
Несколько сложностей сразу 31 100% 0%
Другой апостроф 104 100% 0%
Не та раскладка 63 100% 0%
Всего 390 100% 21%

В среднем запрос находит 1–1,4 товара, то есть совпадения не размазываются на весь каталог. Набор составлен вместе с правилами, поэтому это верхняя оценка: живые запросы стоит добавлять в набор по мере появления.

O'zbekcha

Qidiruv uchun o'zbek matni: istalgan apostrof, lotin va kirill yozuvi, noto'g'ri klaviatura tartibi, qo'shimchalar (telefonlarga → telefon).

O'rnatish: composer require iamtime/uztext. Misollar examples/ papkasida: basics.php (har bir qism alohida), catalog-search.php (xotiradagi katalog bo'yicha qidiruv), sqlite-search.php (PDO orqali bazada qidiruv), laravel/HasUzbekSearch.php (Eloquent modeli uchun trait). Ishga tushirish: php examples/basics.php.

English

Uzbek text for search: any apostrophe, Latin and Cyrillic scripts, a wrong keyboard layout, word endings (telefonlarga → telefon). MIT.

Install: composer require iamtime/uztext. Examples are in examples/: basics.php shows each part on its own, catalog-search.php searches a catalog in memory, sqlite-search.php searches a database through PDO, and laravel/HasUzbekSearch.php is a trait for an Eloquent model. Run one with php examples/basics.php. Tests: composer install && composer test.


All versions of uztext with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iamtime/uztext contains the following files

Loading the files please wait ...