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)[source]¶ -
sitelinks= None¶ 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
-
reference_claims= None¶ int : A count of reference claims 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.
-
has_property(property, name=None)[source]¶ 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)[source]¶ 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)[source]¶ -
sitelinks_added= None¶ int : The number of sitelinks added
-
sitelinks_removed= None¶ int : The number of sitelinks removed
-
sitelinks_changed= None¶ 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
-
statements_added= None¶ int : The number of statements/claims added
-
claims_added= None¶ int : The number of statements/claims added
-
statements_removed= None¶ int : The number of statements/claims removed
-
claims_removed= None¶ int : The number of statements/claims removed
-
statements_changed= None¶ int : The number of statements/claims changed
-
claims_changed= None¶ int : The number of statements/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.
-
proportion_of_links_added= None¶ int : The proportion of links added.
-
identifiers_changed= None¶ int : The number of identifiers that were changed
-
property_changed(property, name=None)[source]¶ Returns a
revscoring.Featurethat 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>)’
-