PHPackages                             mapado/simstring-bundle - 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. mapado/simstring-bundle

AbandonedArchivedSymfony-bundle

mapado/simstring-bundle
=======================

Mapado Simstring Bundle: Record search

v1.1.1(11y ago)22.2k2MITPHPPHP &gt;=5.3.3

Since Aug 7Pushed 11y ago12 watchersCompare

[ Source](https://github.com/mapado/SimstringBundle)[ Packagist](https://packagist.org/packages/mapado/simstring-bundle)[ RSS](/packages/mapado-simstring-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (14)Used By (0)

SimstringBundle
===============

[](#simstringbundle)

Mapado SimstringBundle : Symfony bundle for simstring record search

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

[](#installation)

This extension use [Simstring](http://www.chokkan.org/software/simstring/). You can find a description of how we use it on mapado.com [on our blog](http://blog.mapado.com/fast-record-search-simstring-php-simstringbundle/).

You have to install [Simsting PHP Extension](http://blog.mapado.com/fast-record-search-simstring-php-simstringbundle/#php-extension-installation) to make this bundle working.

### Get the bundle

[](#get-the-bundle)

Add this in your composer.json

```
{
	"require": {
		"mapado/simstring-bundle": "1.*"
	}
}
```

and then run

```
php composer.phar update
```

or

```
composer update
```

if you installed composer globally.

### Add the classes to your kernel

[](#add-the-classes-to-your-kernel)

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Mapado\SimstringBundle\MapadoSimstringBundle(),
    );
}
```

### Configuration

[](#configuration)

#### Declare your databases

[](#declare-your-databases)

```
# app/config/config.yml
mapado_simstring:
    databases:
        city: "path/to/your/database/city.db"
        country: "path/to/your/database/country.db"
```

#### Declare your readers

[](#declare-your-readers)

```
# app/config/config.yml
mapado_simstring:
    databases:
        city: "path/to/your/database/city.db"
        country: "path/to/your/database/country.db"
    reader:
        city_cosine:
            database: city
            measure: cosine # values are cosine/dice/jaccard/overlap/exact
            threshold: 0.7 # float between 0 and 1
            min_results: 1 # minimim number of results if you have a lower threshold limit
        # you can add as many reader you like
```

#### Declare your writers

[](#declare-your-writers)

```
# app/config/config.yml
mapado_simstring:
    databases:
        city: "path/to/your/database/city.db"
        country: "path/to/your/database/country.db"
    reader:
        city:
            database: city
            measure: cosine # values are cosine/dice/jaccard/overlap/exact (default is: exact)
            threshold: 0.7 # float between 0 and 1
            min_results: 1 # minimim number of results if you have a lower threshold limit
        # you can add as many reader you like

    writer:
        city:
            database: city
            unicode: false # not required
            ngram: 3 # not required
            be: false # not required
```

#### Link with Doctrine ORM

[](#link-with-doctrine-orm)

SimstringBundle is compatible with Doctrine ORM. You only add a few database settings to get objects from your database.

```
# app/config/config.yml
mapado_simstring:
    databases:
        city:
            path: "path/to/your/database/city.db"
            persistence:
                driver: orm # only ORM is supported for the moment
                model: \Mapado\MyEntityBundle\Entity\City # required
                field: simstringColumn # required
                options: # optional
                    manager: geolocation # if not set, the default manager will be used
                    repository_method: findVisibleBy # findBy is used by default
```

### Usage

[](#usage)

You can now use the functions in your controllers or via command line

#### Command Line

[](#command-line)

```
# Perform the query
php app/console mapado:simstring:search city cihcago
# will output chicago

# Perform an insert
php app/console mapado:simstring:insert city chicago houson boston montréal
# will rewrite the database with this cities
```

#### Controller

[](#controller)

```
// Perform the query
$resultList = $this->get('mapado.simstring.city_reader')->find('New Yrok');

// Dynamically change the threshold
$resultList = $this->get('mapado.simstring.city_reader')->find('New Yrok', 0.3);
```

`$resultList` will be an iterator of `SimstringResult` having a string (or an Entity if you used the ORM mapper) as value.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~41 days

Recently: every ~95 days

Total

13

Last Release

4159d ago

Major Versions

v0.4.1 → v1.0.02013-12-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/3277986d0e1f93c7e8a58fdaf1b52e3f5a1588e73dfa298d33aafb1ebbde5ef2?d=identicon)[jdeniau](/maintainers/jdeniau)

![](https://www.gravatar.com/avatar/90d135128b469dc38fcf186ac78d0f2cd82fc696ffcf5be8a8c486b7bd911ff6?d=identicon)[mapado](/maintainers/mapado)

---

Top Contributors

[![jdeniau](https://avatars.githubusercontent.com/u/1398469?v=4)](https://github.com/jdeniau "jdeniau (31 commits)")

---

Tags

symfonymapadosimstringrecord search

### Embed Badge

![Health badge](/badges/mapado-simstring-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mapado-simstring-bundle/health.svg)](https://phpackages.com/packages/mapado-simstring-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[php-flasher/flasher-symfony

Integrate flash notifications into Symfony projects effortlessly with PHPFlasher. Improve user experience and application feedback loops easily.

141.3M19](/packages/php-flasher-flasher-symfony)[cmsig/seal-symfony-bundle

An integration of CMS-IG SEAL search abstraction into Symfony Framework.

15195.8k5](/packages/cmsig-seal-symfony-bundle)

PHPackages © 2026

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