def load_kg_file(filepath, separator='\t', as_stream=False):
    ' Import knowledge graph from file\n\n    Parameters\n    ----------\n    filepath: str\n        File path\n    separator: str\n        File column separator\n\n    Returns\n    -------\n    iterator\n        The knowledge graph triplets obtained from the files with size [?, 3]\n    '
    kg_triples = []
    with advanced_open(filepath) as file_content:
        for line in file_content:
            kg_triples.append(line.strip().split(separator))
    return np.array(kg_triples)
Import knowledge graph from file

Parameters
----------
filepath: str
    File path
separator: str
    File column separator

Returns
-------
iterator
    The knowledge graph triplets obtained from the files with size [?, 3]
def load_kg_file(filepath, separator='\t', as_stream=False):
    ' Import knowledge graph from file\n\n    Parameters\n    ----------\n    filepath: str\n        File path\n    separator: str\n        File column separator\n\n    Returns\n    -------\n    iterator\n        The knowledge graph triplets obtained from the files with size [?, 3]\n    '
    kg_triples = []
    with advanced_open(filepath) as file_content:
        for line in file_content:
            kg_triples.append(line.strip().split(separator))
    return np.array(kg_triples)