PHPackages                             spekulatius/keyword-merge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. spekulatius/keyword-merge

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spekulatius/keyword-merge
=========================

A helper to compare and merge similar keywords using PHP.

3.0(4y ago)10625↓75%1GPL-3.0-or-laterPHPPHP ^7.2|^8.0

Since Oct 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/spekulatius/keyword-merge)[ Packagist](https://packagist.org/packages/spekulatius/keyword-merge)[ Docs](https://phpscraper.de)[ Fund](https://www.buymeacoffee.com/spekulatius)[ GitHub Sponsors](https://github.com/sponsors/spekulatius)[ RSS](/packages/spekulatius-keyword-merge/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (16)Used By (0)

PHP Keyword Comparator / Merger
===============================

[](#php-keyword-comparator--merger)

An helper to compare similarity of keywords or list of keyword.

You will still need to a make a final call which helper(s) to use and how to configure them.

This package is intended to be used with [PHPScraper](https://github.com/spekulatius/phpscraper).

Sponsors
--------

[](#sponsors)

This project is sponsored by:

[![](https://camo.githubusercontent.com/9c05aed64d77525de0e9dc203f1b155a39ff5e1c1a202dbfbf199b0b21361783/68747470733a2f2f6272696e67796f75726f776e69646561732e636f6d2f696d616765732f62796f692d6c6f676f2e6a7067)](https://bringyourownideas.com)

Want to sponsor this project? [Contact me](https://peterthaleikis.com/contact).

Install
-------

[](#install)

```
composer require spekulatius/keyword-merge
```

At a glance
-----------

[](#at-a-glance)

Here are a few impressions on the way the library works:

```
$kwcmp = new Spekulatius\KeywordMerge\KeywordComparator;

$kwcmp->matchesWord('tbilisi georgia', 'is tbilisi the capital of georgia?');
// false

$kwcmp->containsWord('tbilisi georgia', 'is tbilisi the capital of georgia?');
// true

$kwcmp->similarWord('tbilisi georgia', 'georgias tbilisi');
// true
```

You call also use arrays with correlated methods:

```
$kwcmp = new Spekulatius\KeywordMerge\KeywordComparator;

$kwcmp->matchesWords('tbilisi georgia', 'is tbilisi the capital of georgia?');
// []

$kwcmp->containsWords('tbilisi georgia', 'is tbilisi the capital of georgia?');
// ['is tbilisi the capital of georgia?']

$kwcmp->similarWords('tbilisi georgia', 'georgias tbilisi');
// ['georgias tbilisi']
```

Keywords in URL Path
--------------------

[](#keywords-in-url-path)

The library can also test for keywords in the URL path:

```
$kwcmp = new Spekulatius\KeywordMerge\KeywordComparator;

$kwcmp->inUrlPath('https://example.com/cats-are-awesome', 'seo tools');
// false

$kwcmp->inUrlPath('https://example.com/seo-tools', 'seo tools');
// true

$kwcmp->inUrlPath('https://example.com/chrome-seo-tools', 'chrome seo tools and toolkit');
// true - one word difference is accepted, from 3+ words
```

Further example and cases can be found in the tests!

Related Links
-------------

[](#related-links)

- [Simple performance test between PHPScraper and Python3 BeautifulSoup](https://github.com/spekulatius/link-scraping-test-beautifulsoup-vs-phpscraper)
- [Keyword length distribution example with PHPScraper](https://github.com/spekulatius/phpscraper-keyword-length-distribution-example)
- [Keyword Scraping Example using PHPScraper](https://github.com/spekulatius/phpscraper-keyword-scraping-example)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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 ~37 days

Recently: every ~113 days

Total

15

Last Release

1568d ago

Major Versions

0.2.0 → 1.0.02020-12-22

1.0.0 → 2.0.02020-12-22

2.1.2 → 3.02022-03-17

PHP version history (2 changes)0.0.1PHP ^7.2

3.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8433587?v=4)[Peter Thaleikis](/maintainers/spekulatius)[@spekulatius](https://github.com/spekulatius)

---

Top Contributors

[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (26 commits)")

---

Tags

keyword-analysiskeyword-extractionkeyword-extractorkeyword-matchkeyword-spottingphp-scraperphp-scrapperweb-scrapingPHP Libraryweb-scraping PHP scraperPHP scrapingkeyword similaritykeyword mergingkeyword cleanupkeyword filtering

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spekulatius-keyword-merge/health.svg)

```
[![Health](https://phpackages.com/badges/spekulatius-keyword-merge/health.svg)](https://phpackages.com/packages/spekulatius-keyword-merge)
```

###  Alternatives

[spekulatius/phpscraper

PHPScraper, built with simplicity in mind. See tests/ for more examples.

586154.2k3](/packages/spekulatius-phpscraper)[lodash-php/lodash-php

A port of Lodash to PHP

528756.2k5](/packages/lodash-php-lodash-php)[niiknow/bayes

a machine learning lib

7056.3k](/packages/niiknow-bayes)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9813.9k](/packages/amirezaeb-heroqr)[rapidwebltd/php-uk-bank-holidays

This library enables developers to easily retrieve UK Bank Holiday details. Holidays can be retrieved for England &amp; Wales, Scotland, and Northern Ireland. Information about these holidays can optionally be restricted by month or date.

12424.4k](/packages/rapidwebltd-php-uk-bank-holidays)[eddieace/php-simple

1364.5k](/packages/eddieace-php-simple)

PHPackages © 2026

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