#NEWLINE# def iterate_rdf_triples( file_path ) : #NEWLINE# #INDENT# '\n    A function that iterates over the lines of an rdf file and parse the lines.\n    :param file_path:\n    :return: generator\n    ' #NEWLINE# open_fn = open_file ( file_path ) #NEWLINE# rdf_parser = get_rdf_parser ( file_path ) #NEWLINE# with open_fn ( in_file , 'r' ) as in_file : #NEWLINE# #INDENT# for rdf_line in in_file : #NEWLINE# #INDENT# rdf_stream = rdf_parser . parse_string_as_stream ( rdf_line , '.' ) #NEWLINE# for statement in rdf_stream : #NEWLINE# #INDENT# ( yield ( statement . subject , statement . predicate , statement . object ) )