Life on earth relies on three types of information polymers- DNA, RNA and proteins. In all organisms and viruses, these molecules are synthesized by the copying of pre-existing templates. A triplet-based code known as the genetic code guides the synthesis of proteins by complex enzymatic machines that decode genetic information in RNA sequences. The origin of the genetic code is one of the most fundamental questions in biology. In this study, computational analysis of about 5,000 species level metagenomes using techniques for the analysis of human language suggests that the genomes of extant organisms contain relics of a distinct triplet code that potentially predates the genetic code. This code defines the relationship between adjacent triplets in DNA/RNA sequences, whereby these triplets predominantly differ by a single base. Furthermore, adjacent triplets encode amino acids that are thought to have emerged around the same period in the earth's early history. The results suggest that the order of triplets in primordial RNA sequences was associated with the availability of specific amino acids, perhaps due to a coupling of a triplet-based primordial RNA synthesis mechanism to a primitive mechanism of peptide bond formation. Together, this coupling could have given rise to early nucleic acid sequences and a system for encoding amino acid sequences in RNA, i.e. the genetic code. Thus, the central role of triplets in biology potentially extends to the primordial world, contributing to both the origins of genomes and the origins of genetically coded protein synthesis.