revscoring.features.wikibase

This features module provides access to features of the bytes of content in revisions.

revscoring.features.wikibase.revision = {wikibase.revision}

Supporting classes

class revscoring.features.wikibase.Revision(name, revision_datasources)

int : A count of sitelinks in the revision

labels = None

int : A count of labels in the revision

aliases = None

int : A count of aliases in the revision

descriptions = None

int : A count of descriptions in the revision

properties = None

int : A count of properties in the revision

claims = None

int : A count of claims in the revision

sources = None

int : A count of sources in the revision

qualifiers = None

int : A count of qualifiers in the revision

badges = None

int : A count of badges in the revision

parent = None

revscoring.features.wikibase.Revision : The parent (aka “previous”) revision of the page.

diff = None

Diff : The difference between this revision and the parent revision.

has_property(property, name=None)

Returns True if the specified property exists

Parameters:
property : str

The name of a property (usually preceeded by “P”)

name : str

A name to associate with the feature. If not set, the feature’s name will be ‘has_property(<property>)’

has_property_value(property, value, name=None)

Returns True if the specified property matches the provided value.

Parameters:
property : str

The name of a property (usually preceeded by “P”)

value : mixed

The value to match

name : str

A name to associate with the Feature. If not set, the feature’s name will be ‘has_property_value(<property>, <value>)’

class revscoring.features.wikibase.Diff(name, datasources)

int : The number of sitelinks added

int : The number of sitelinks removed

int : The number of sitelinks changed

labels_added = None

int : The number of labels added

labels_removed = None

int : The number of labels removed

labels_changed = None

int : The number of labels changed

aliases_added = None

int : The number of aliases added

aliases_removed = None

int : The number of aliases removed

aliases_changed = None

int : The number of aliases changed

descriptions_added = None

int : The number of descriptions added

descriptions_removed = None

int : The number of descriptions removed

descriptions_changed = None

int : The number of descriptions changed

properties_added = None

int : The number of properties added

properties_removed = None

int : The number of properties removed

properties_changed = None

int : The number of properties changed

claims_added = None

int : The number of claims added

claims_removed = None

int : The number of claims removed

claims_changed = None

int : The number of claims changed

sources_added = None

int : The number of sources added

sources_removed = None

int : The number of sources removed

qualifiers_added = None

int : The number of qualifiers added

qualifiers_removed = None

int : The number of qualifiers removed

badges_added = None

int : The number of badges added

badges_removed = None

int : The number of badges removed

badges_changed = None

int : The number of badges changed

proportion_of_qid_added = None

int : The proportion of Q# added.

proportion_of_language_added = None

int : The proportion of language added.

int : The proportion of links added.

identifiers_changed = None

int : The number of identifiers that were changed

property_changed(property, name=None)

Returns a revscoring.Feature that represents whether a property was changed.

Parameters:
property : str

The property name

name : str

A name to associate with the feature. If not set, the feature’s name will be ‘property_changed(<property>)’

Revision Scoring

Navigation

Related Topics