PropertySuggester is an extension to Wikibase to provide suggested properties when a user tries to add new statements to an item.
On Packagist:
The recommended way to use this library is via 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": "*"
}
}
This extension adds a new table "wbs_propertypairs" that contains the information that is needed to generate suggestions. You can use PropertySuggester-Python to generate this data from a wikidata dump.
- run
composer dump-autoload
in the extension folder (if installed without composer) - add
require_once "$IP/extensions/PropertySuggester/PropertySuggester.php";
to your localsettings - run
maintenance/update.php
to create the necessary table - follow the readme of PropertySuggester-Python to generate and load suggestion data
- $wgPropertySuggesterMinProbability - a float that sets a minimum threshold for suggestions (default 0.05)
- $wgPropertySuggesterDeprecatedIds - a list of ints that blacklist suggestions
- $wgPropertySuggesterInitialSuggestions - a list of ints that will be suggested when no statements exist
- Converted extension to use MediaWiki extension registration.
- 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
- Adapted entity suggester for changes in Wikibase.
- Adapted entity suggester for changes in Wikibase.
- Handle MediaWiki's
OutputPage::getTitle
returningnull
.
- Only get suggestions once when the property input field is initially focused.
- Follow up fix for entity suggester, update cache management in EntitySuggester.
- Follow up fix for entity suggester, update method call in EntitySuggester.
- Adapted entity suggester for changes in Wikibase.
- Adapt entity type for namespaces
- Minor cleanups
- Defined compatibility with Wikibase DataModel ~6.0
- Now requires PHP 5.5.0 or higher
- Defined compatibility with Wikibase DataModel ~5.0
- Add i18n to the
wbsgetsuggestions
api module. This makes MediaWiki'sApiDocumentationTest
pass.
- Fixed ResourceLoader dependencies of the
jquery.wikibase.entityselector
module.
- Defined compatibility with Wikibase DataModel Services ~3.0
- Defined compatibility with Wikibase DataModel Services ~2.0
- Added explicit dependency on Wikibase DataModel.
wbsgetsuggestions
API never returns more than onealiases
entry per match.wbsgetsuggestions
does not returnaliases
when the label already is a successful match.wbsearchentities
is explicitely called with theuselang
option set.
- Require DataModelServices ~1.1
- Use EntityLookup interface from DataModelServices to replace removed WikibaseLib interface
- Fix use of WikibaseApiTestCase due to namespace change
- Replace use of Wikibase\TermIndex::getMatchingIDs with Wikibase\TermIndex::getTopMatchingTerms.
- EntitySelector no longer passes "type" parameter to wbsgetsuggestions which avoids an "Unrecognized parameter" warning.
- Replace use of Wikibase\Term with Wikibase\TermIndexEntry, per change in Wikibase.
- Adjust api code for core api changes (this requires a newer mediawiki core)
- Replace deprecated Item::addClaim
- Suggest initial properties for items and properties with no statements yet.
- No longer use Wikibase\Utils as it was renamed
- Remove obvious function-level profiling
- Fix TermIndex method call in ResultBuilder
- Adjust to changes in ValueView 0.10.0.
- Adjust to removal of claimview
- Fix TermIndex method call in ResultBuilder
Adjust to new version of DataModel-JavaScript
- Consider classifying properties (needs version 2.0.0 of PropertySuggester-Python)
- Replace usage of Wikibase\NamespaceUtils for compatibility with Wikibase Repo.
- Specified GPL-2.0+ license
- Wikibase Data Model 2.0 compatibility fixes.
- Wikibase Data Model 1.0 compatibility fixes.
- Update namespace of EntityTitleLookup, per change in Wikibase.
- Suggest properties for qualifiers and references based on the property of the mainsnak
- Provide Property-Suggestions based on correlations to other properties in the item