Triples generation