kgdata.wikipedia.datasets.linked_relational_tables#

Functions

deser_linked_tables(x)

extract_cell_links(cell)

extract_title_to_tables(tbl)

Extract (link, table id) in a table

linked_relational_tables([lang])

Convert Wikipedia links in HTML tables to links in Wikidata using sitelinks

linked_tables(table_dataset_name[, lang])

Convert Wikipedia links in HTML tables to links in Wikidata using sitelinks

merge_link_to_table(x)

ser_linked_tables(tbl)

linked_tables(table_dataset_name: Literal['html_tables', 'relational_tables'], lang: str = 'en') Dataset[LinkedHTMLTable][source]#

Convert Wikipedia links in HTML tables to links in Wikidata using sitelinks

Parameters:
  • table_dataset_name (Literal['html_tables', 'relational_tables']) – the table dataset to convert

  • lang (str) – the language of Wikidata

Return type:

Dataset[LinkedHTMLTable]

linked_relational_tables(lang: str = 'en') Dataset[LinkedHTMLTable][source]#

Convert Wikipedia links in HTML tables to links in Wikidata using sitelinks

Parameters:

lang (str) – the language of Wikidata

Return type:

Dataset[LinkedHTMLTable]

deser_linked_tables(x: str) LinkedHTMLTable[source]#
Parameters:

x (str) –

Return type:

LinkedHTMLTable

ser_linked_tables(tbl: LinkedHTMLTable) bytes[source]#
Parameters:

tbl (LinkedHTMLTable) –

Return type:

bytes

extract_title_to_tables(tbl: Table) List[Tuple[str, str]][source]#

Extract (link, table id) in a table

Parameters:

tbl (Table) –

Return type:

List[Tuple[str, str]]

Parameters:

x (Tuple[str, Tuple[Table, Union[None, Iterable[Tuple[str, Optional[str]]]]]]) –

Return type:

LinkedHTMLTable

Parameters:

cell (Cell) –

Return type:

List[WikiLink]