NECKAr_WikidataAPI module¶
-
NECKAr_WikidataAPI.
get_wikidata_item_tree_item_idsSPARQL
(root_items, forward_properties=None, backward_properties=None)[source]¶ - Return ids of WikiData items, which are in the tree spanned by the given root items and claims relating them
- to other items.
Parameters: - root_items – iterable[int] One or multiple item entities that are the root elements of the tree
- forward_properties – iterable[int] | None property-claims to follow forward; that is, if root item R has a claim P:I, and P is in the list, the search will branch recursively to item I as well.
- backward_properties – iterable[int] | None property-claims to follow in reverse; that is, if (for a root item R) an item I has a claim P:R, and P is in the list, the search will branch recursively to item I as well.
Returns: iterable[int]: List with ids of WikiData items in the tree