def get_triples(self):
instance_triple = []<EOL>relation_triple = []<EOL>attribute_triple = []<EOL>for i in range(len(self.nodes)):<EOL><INDENT>instance_triple.append(("<STR_LIT>", self.nodes[i], self.node_values[i]))<EOL>for l in self.relations[i]:<EOL><INDENT>relation_triple.append((l[<NUM_LIT:0>], self.nodes[i], l[<NUM_LIT:1>]))<EOL><DEDENT>for l in self.attributes[i]:<EOL><INDENT>attribute_triple.append((l[<NUM_LIT:0>], self.nodes[i], l[<NUM_LIT:1>]))<EOL><DEDENT><DEDENT>return instance_triple, attribute_triple, relation_triple<EOL>
Get the triples in three lists.
instance_triple: a triple representing an instance. E.g. instance(w, want-01)
attribute triple: relation of attributes, e.g. polarity(w, - )
and relation triple, e.g. arg0 (w, b)