Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjdev/php-ext-shellinford
PHP Extension for shellinford (FM-Index)
https://github.com/kjdev/php-ext-shellinford
Last synced: 25 days ago
JSON representation
PHP Extension for shellinford (FM-Index)
- Host: GitHub
- URL: https://github.com/kjdev/php-ext-shellinford
- Owner: kjdev
- Created: 2013-12-20T02:51:04.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-20T03:06:09.000Z (about 11 years ago)
- Last Synced: 2024-11-18T00:52:27.821Z (about 2 months ago)
- Language: C
- Size: 238 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Extension for shellinford (FM-Index)
This extension allows to access the functionality provided by
shellinford (FM-Index).More information about the shellinford can be found at
[» https://code.google.com/p/shellinford/](https://code.google.com/p/shellinford/)## Build
```
% phpize
% ./configure
% make
% make install
```## Configration
shellinford.ini:
```
extension=shellinford.so
```## Examples
```php
namespace Shellinford;$docs = array("apple", "orange", "remon", "application");
$index = new FMindex;
foreach ($docs as $doc) {
$index->push_back($doc);
}$index->build();
var_dump($index->docsize());
/*
int(4)
*/var_dump($index->search("app"));
/*
array(2) {
[0]=>
string(5) "apple"
[3]=>
string(11) "application"
}
*/var_dump($index->search("apple"));
/*
array(1) {
[0]=>
string(5) "apple"
}
*/var_dump($index->search("apply"));
/*
array(0) {
}
*/
```## Related
* [api document](http://api.at-ninja.jp/php-ext-shellinford/)