Download the PHP package minuux/simpledict without Composer

On this page you can find all versions of the php package minuux/simpledict. 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 simpledict

SimpleDict

这是一个简单快速的词库工具,用来从一段文本中找出存在于词库的词语。

特点

  • 简单:纯 PHP 实现,无需安装扩展。
  • 快速:查找耗时跟词库大小关系不大(我的小破本上查询 40 万的词库轻轻松松),不会一次性加载整个词库,使用时内存占用小(就是生成词库的时候有点费内存)。

使用方法

准备文本格式的词库

首先准备一个文本文件,每个词占一行。格式:

词语<tab>值

生成 SimpleDict 专用词库

SimpleDict::make("text_file_path", "output_dict_path");

搜索

$dict = new SimpleDict("dict_path");
$result = $dict->search("some text here...");

/* $result 的格式:
array(
  'word1' => array('value' => 'value1', 'count' => 'count1'),
  ...
)*/

替换

// 简单替换
$replaced = $dict->replace("some text here...", "**");
// 高级替换
$replaced = $dict->replace("some text here...", function($word, $value) {
  return "[$word -> $value]";
});

All versions of simpledict with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 minuux/simpledict contains the following files

Loading the files please wait ....