PHPackages                             propertysuggester/property-suggester - 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. propertysuggester/property-suggester

ActiveMediawiki-extension

propertysuggester/property-suggester
====================================

Extension for Wikibase to provide useful suggestions for new properties

31.9kPHP

Since Sep 19Pushed 5d ago16 watchersCompare

[ Source](https://github.com/wikimedia/mediawiki-extensions-PropertySuggester)[ Packagist](https://packagist.org/packages/propertysuggester/property-suggester)[ RSS](/packages/propertysuggester-property-suggester/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (377)Used By (0)

PropertySuggester
=================

[](#propertysuggester)

PropertySuggester is an extension to Wikibase to provide suggested properties when a user tries to add new statements to an item.

On [Packagist](https://packagist.org/packages/propertysuggester/property-suggester): [![Latest Stable Version](https://camo.githubusercontent.com/bded22451b1cc5ba89f1d6f5941c3a5f63da99de3288fe49329204be241c9817/68747470733a2f2f706f7365722e707567782e6f72672f70726f70657274797375676765737465722f70726f70657274792d7375676765737465722f762f737461626c652e706e67)](https://packagist.org/packages/propertysuggester/propertysuggester)[![License](https://camo.githubusercontent.com/20826895f28f5d23d8d52632e316dc6fa2c6ace26da1e6af946f2ba28148dcf1/68747470733a2f2f706f7365722e707567782e6f72672f70726f70657274797375676765737465722f70726f70657274792d7375676765737465722f6c6963656e73652e706e67)](https://packagist.org/packages/propertysuggester/propertysuggester)

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

[](#installation)

The recommended way to use this library is via [Composer](http://getcomposer.org/).

### Composer

[](#composer)

To add this package as a local, per-project dependency to your project, simply add a dependency on `propertysuggester/property-suggester` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file:

```
{
    "require": {
        "propertysuggester/property-suggester": "*"
    }
}

```

### Setup

[](#setup)

This extension adds a new table "wbs\_propertypairs" that contains the information that is needed to generate suggestions. You can use [property-suggester-scripts](https://gerrit.wikimedia.org/r/plugins/gitiles/wikibase/property-suggester-scripts/) to generate this data from a wikidata dump.

- add `wfLoadExtension( 'PropertySuggester' );` to your localsettings
- run `maintenance/update.php` to create the necessary table
- follow the readme of PropertySuggester-Python to generate and load suggestion data

### Configuration

[](#configuration)

- $wgPropertySuggesterMinProbability - a float that sets a minimum threshold for suggestions (default 0.05)
- $wgPropertySuggesterDeprecatedIds - a list of ints that won't be used for suggestions
- $wgPropertySuggesterInitialSuggestions - a list of ints that will be suggested when no statements exist
- $wgPropertySuggesterSchemaTreeUrl - a string that contains the URL of the endpoint for the SchemaTree suggester (required if the default suggester is SchemaTree or if A/B testing is enabled)
- $wgPropertySuggesterABTestingState - a boolean representing the state of A/B testing
- $wgPropertySuggesterDefaultSuggester - a string representing the default suggester used (either SchemaTreeSuggester or PropertySuggester)
- $wgPropertySuggesterTestingRatio - an int that represents the ratio of suggesters used when A/B testing is enabled. Value of 2 will result in an approximate 50/50 split, values greater than 2 will result in the PropertySuggester being used more often

Release notes
-------------

[](#release-notes)

### 3.2.1 (2018-11-14)

[](#321-2018-11-14)

- Added compatibility with Wikibase DataModel 9.x

### 3.2.0 (2017-04-24)

[](#320-2017-04-24)

- Converted extension to use MediaWiki extension registration.

### 3.1.7 (2017-03-27)

[](#317-2017-03-27)

- Added compatibility with Wikibase DataModel 7.x
- Raised minimal required Wikibase DataModel version to 6.1
- Added safe guard to make sure `SimpleSuggester` does not index non-Items as Items

### 3.1.6 (2017-01-03)

[](#316-2017-01-03)

- Adapted entity suggester for changes in Wikibase.

### 3.1.5 (2016-12-02)

[](#315-2016-12-02)

- Adapted entity suggester for changes in Wikibase.

### 3.1.4 (2016-10-03)

[](#314-2016-10-03)

- Handle MediaWiki's `OutputPage::getTitle` returning `null`.

### 3.1.3 (2016-08-31)

[](#313-2016-08-31)

- Only get suggestions once when the property input field is initially focused.

### 3.1.2 (2016-08-04)

[](#312-2016-08-04)

- Follow up fix for entity suggester, update cache management in EntitySuggester.

### 3.1.1 (2016-08-03)

[](#311-2016-08-03)

- Follow up fix for entity suggester, update method call in EntitySuggester.

### 3.1.0 (2016-08-03)

[](#310-2016-08-03)

- Adapted entity suggester for changes in Wikibase.

### 3.0.2 (2016-06-20)

[](#302-2016-06-20)

- Adapt entity type for namespaces
- Minor cleanups

### 3.0.1 (2016-03-14)

[](#301-2016-03-14)

- Defined compatibility with Wikibase DataModel ~6.0

### 3.0.0 (2016-02-25)

[](#300-2016-02-25)

- Now requires PHP 5.5.0 or higher
- Defined compatibility with Wikibase DataModel ~5.0

### 2.4.5 (2015-12-27)

[](#245-2015-12-27)

- Add i18n to the `wbsgetsuggestions` api module. This makes MediaWiki's `ApiDocumentationTest` pass.

### 2.4.4 (2015-10-14)

[](#244-2015-10-14)

- Fixed ResourceLoader dependencies of the `jquery.wikibase.entityselector` module.

### 2.4.3 (2015-09-17)

[](#243-2015-09-17)

- Defined compatibility with Wikibase DataModel Services ~3.0

### 2.4.2 (2015-09-03)

[](#242-2015-09-03)

- Defined compatibility with Wikibase DataModel Services ~2.0

### 2.4.1 (2015-08-27)

[](#241-2015-08-27)

- Added explicit dependency on Wikibase DataModel.
- `wbsgetsuggestions` API never returns more than one `aliases` entry per match.
- `wbsgetsuggestions` does not return `aliases` when the label already is a successful match.
- `wbsearchentities` is explicitely called with the `uselang` option set.

### 2.4.0 (2015-08-12)

[](#240-2015-08-12)

- Require DataModelServices ~1.1
- Use EntityLookup interface from DataModelServices to replace removed WikibaseLib interface

### 2.3.1 (2015-07-13)

[](#231-2015-07-13)

- Fix use of WikibaseApiTestCase due to namespace change

### 2.3.0 (2015-06-26)

[](#230-2015-06-26)

- Replace use of Wikibase\\TermIndex::getMatchingIDs with Wikibase\\TermIndex::getTopMatchingTerms.
- EntitySelector no longer passes "type" parameter to wbsgetsuggestions which avoids an "Unrecognized parameter" warning.

### 2.2.1 (2015-06-18)

[](#221-2015-06-18)

- Replace use of Wikibase\\Term with Wikibase\\TermIndexEntry, per change in Wikibase.

### 2.2.0 (2015-04-29)

[](#220-2015-04-29)

- Adjust api code for core api changes (this requires a newer mediawiki core)
- Replace deprecated Item::addClaim

### 2.1.0 (2015-04-02)

[](#210-2015-04-02)

- Suggest initial properties for items and properties with no statements yet.

### 2.0.6 (2015-02-20)

[](#206-2015-02-20)

- No longer use Wikibase\\Utils as it was renamed
- Remove obvious function-level profiling

### 2.0.5 (2015-01-29)

[](#205-2015-01-29)

- Fix TermIndex method call in ResultBuilder

### 2.0.4 (2015-01-13)

[](#204-2015-01-13)

- Adjust to changes in ValueView 0.10.0.

### 2.0.3 (2015-01-06)

[](#203-2015-01-06)

- Adjust to removal of claimview

### 2.0.2 (2014-12-17)

[](#202-2014-12-17)

- Fix TermIndex method call in ResultBuilder

### 2.0.1 (2014-11-11)

[](#201-2014-11-11)

Adjust to new version of DataModel-JavaScript

### 2.0.0 (2014-11-10)

[](#200-2014-11-10)

- Consider classifying properties (needs version 2.0.0 of PropertySuggester-Python)

### 1.1.4 (2014-10-22)

[](#114-2014-10-22)

- Replace usage of Wikibase\\NamespaceUtils for compatibility with Wikibase Repo.
- Specified GPL-2.0-or-later license

### 1.1.3 (2014-10-17)

[](#113-2014-10-17)

- Wikibase Data Model 2.0 compatibility fixes.

### 1.1.2 (2014-09-05)

[](#112-2014-09-05)

- Wikibase Data Model 1.0 compatibility fixes.

### 1.1.1 (2014-08-27)

[](#111-2014-08-27)

- Update namespace of EntityTitleLookup, per change in Wikibase.

### 1.1.0 (2014-07-25)

[](#110-2014-07-25)

- Suggest properties for qualifiers and references based on the property of the mainsnak

### 1.0.0 (2014-07-01)

[](#100-2014-07-01)

- Provide Property-Suggestions based on correlations to other properties in the item

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance65

Regular maintenance activity

Popularity19

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://www.gravatar.com/avatar/054adb441e7ee248ec924bc45fa793835c284710eb31627587fa5de21bab9e96?d=identicon)[wmde](/maintainers/wmde)

![](https://www.gravatar.com/avatar/5406ed1d40d50ffc61d67e9f5149914dbfe0b8a52bdf297299f5ccfab0a73d91?d=identicon)[thiemowmde](/maintainers/thiemowmde)

![](https://www.gravatar.com/avatar/99b03312aa8fcf47db8cbde452192aa5b96c27d1b99c4c1fb22af92ae1dbb0fb?d=identicon)[filbertkm](/maintainers/filbertkm)

![](https://www.gravatar.com/avatar/c288fdfea2abce5689184faa12fa593b40bbf87b6b192c7b2afcee4b74f45185?d=identicon)[xchrdw](/maintainers/xchrdw)

---

Top Contributors

[![xchrdw](https://avatars.githubusercontent.com/u/1078427?v=4)](https://github.com/xchrdw "xchrdw (235 commits)")[![Dacry](https://avatars.githubusercontent.com/u/4259072?v=4)](https://github.com/Dacry "Dacry (106 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (105 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (62 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (43 commits)")[![mariushoch](https://avatars.githubusercontent.com/u/2446964?v=4)](https://github.com/mariushoch "mariushoch (36 commits)")[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (30 commits)")[![lucaswerkmeister](https://avatars.githubusercontent.com/u/2346599?v=4)](https://github.com/lucaswerkmeister "lucaswerkmeister (22 commits)")[![tobijat](https://avatars.githubusercontent.com/u/2997252?v=4)](https://github.com/tobijat "tobijat (19 commits)")[![Ladsgroup](https://avatars.githubusercontent.com/u/5351225?v=4)](https://github.com/Ladsgroup "Ladsgroup (16 commits)")[![Nikerabbit](https://avatars.githubusercontent.com/u/1109395?v=4)](https://github.com/Nikerabbit "Nikerabbit (14 commits)")[![filbertkm](https://avatars.githubusercontent.com/u/135401?v=4)](https://github.com/filbertkm "filbertkm (11 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (10 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (9 commits)")[![ValueError](https://avatars.githubusercontent.com/u/5370991?v=4)](https://github.com/ValueError "ValueError (8 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (8 commits)")[![JonasKress](https://avatars.githubusercontent.com/u/13198391?v=4)](https://github.com/JonasKress "JonasKress (8 commits)")[![legoktm](https://avatars.githubusercontent.com/u/81392?v=4)](https://github.com/legoktm "legoktm (8 commits)")[![JanZerebecki](https://avatars.githubusercontent.com/u/7452727?v=4)](https://github.com/JanZerebecki "JanZerebecki (8 commits)")[![martaannaj](https://avatars.githubusercontent.com/u/44839012?v=4)](https://github.com/martaannaj "martaannaj (6 commits)")

### Embed Badge

![Health badge](/badges/propertysuggester-property-suggester/health.svg)

```
[![Health](https://phpackages.com/badges/propertysuggester-property-suggester/health.svg)](https://phpackages.com/packages/propertysuggester-property-suggester)
```

PHPackages © 2026

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