https://github.com/php-lsys/simhash
simhash for php extension : 判断文本相似度
https://github.com/php-lsys/simhash
php simhash
Last synced: 5 months ago
JSON representation
simhash for php extension : 判断文本相似度
- Host: GitHub
- URL: https://github.com/php-lsys/simhash
- Owner: php-lsys
- Archived: true
- Created: 2018-12-13T07:59:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-08T13:48:46.000Z (about 4 years ago)
- Last Synced: 2026-01-14T14:00:10.014Z (5 months ago)
- Topics: php, simhash
- Language: C
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
文本相似度比较(simhash算法)
===
> PHP扩展方式实现,支持 php>=7.0
> php-src 为PHP方式实现 默认用php方式,编译扩展后使用扩展
> 使用示例 [test.php](./test.php)
#### linux or mac 下编译
```shell
cd simhash
phpize && ./configure
make && make install
```
#### windows 下编译
> [php 8.1 windows dll](https://github.com/shanliu/simhash/releases)
> load build env
```
打开 [x64|x86] Native Tools Command Prompt for VS 2017 编译命令行
加载PHP编译变量 \your-php-sdk-binary-tools-dir\bin\phpsdk_setvars.bat
```
```cmd
cd your_php_src # PHP 源码目录 下载 simhash 源码到 ext/simhash 下
buildconf.bat
configure --disable-all --enable-cli --enable-simhash=shared
nmake
```