kgdata.wikidata.datasets.property_domains#

Functions

get_property_domains(ent)

merge_counters(a, b)

property_domains([lang])

Extract the domains of a property.

property_domains(lang='en') Dataset[Tuple[str, Dict[str, int]]][source]#

Extract the domains of a property.

NOTE: it does not returns children of a domain class but only the class that appears in the statement with the property.

For example, consider the statement Peter - age - 50. the direct domain is the class Human, and we don’t include class Men, which is a child of the class Human.

Return type:

Dataset[Tuple[str, Dict[str, int]]]

merge_counters(a: Dict[str, int], b: Dict[str, int])[source]#
Parameters:
get_property_domains(ent: WDEntity) List[Tuple[str, Dict[str, int]]][source]#
Parameters:

ent (WDEntity) –

Return type:

List[Tuple[str, Dict[str, int]]]