1. A method for generating an output sequence comprising: providing a reduced directed graph derived from n-gram statistics for a corpus sequence of symbols, the reduced directed graph including a set of nodes connected by edges, each of the edges being labeled with a respective label consisting of a respective sequence of symbols, each of the edges being associated with a multiplicity representing a number of occurrences of the respective sequence of symbols in the corpus sequence, and wherein the sequences of symbols labeling the edges in the reduced directed graph vary in number of symbols, whereby at least one Eulerian cycle through the reduced directed graph traverses each edge a number of times corresponding to the multiplicity of the edge; receiving an input sequence of symbols; with a processor, for a first iteration, generating a first output sequence as a candidate for appending to the input sequence, comprising: identifying a set of the labels of the edges in the reduced directed graph, the identified set of labels each including a prefix and a suffix, the prefix including at least a last symbol of the input sequence, the suffix comprising at least one subsequent symbol to the prefix in the label; sampling a label from the identified set of labels with a probability which is a function of the multiplicity of the edges that are labeled with the labels in the set of labels, and generating the first output sequence from the suffix of the sampled label; outputting, to a graphical user interface, a candidate sequence for appending to the input sequence, comprising outputting at least one of: the first output sequence from the first iteration; and an extended output sequence, the extended output sequence including the first output sequence from the first iteration and a respective subsequent output sequence from each of at least one subsequent iteration appended thereto, wherein in each of the at least one subsequent iteration, the subsequent output sequence is generated from the reduced directed graph as a candidate for appending to an extended input sequence, the extended input sequence for the subsequent iteration being a document sequence generated by appending the first output sequence and each subsequent output sequence of each prior subsequent iteration to the received input sequence.
1. A method for generating an output sequence comprising: providing a reduced directed graph derived from n-gram statistics for a corpus sequence of symbols, the reduced directed graph including a set of nodes connected by edges, each of the edges being labeled with a respective label consisting of a respective sequence of symbols, each of the edges being associated with a multiplicity representing a number of occurrences of the respective sequence of symbols in the corpus sequence, and wherein the sequences of symbols labeling the edges in the reduced directed graph vary in number of symbols, whereby at least one Eulerian cycle through the reduced directed graph traverses each edge a number of times corresponding to the multiplicity of the edge; receiving an input sequence of symbols; with a processor, for a first iteration, generating a first output sequence as a candidate for appending to the input sequence, comprising: identifying a set of the labels of the edges in the reduced directed graph, the identified set of labels each including a prefix and a suffix, the prefix including at least a last symbol of the input sequence, the suffix comprising at least one subsequent symbol to the prefix in the label; sampling a label from the identified set of labels with a probability which is a function of the multiplicity of the edges that are labeled with the labels in the set of labels, and generating the first output sequence from the suffix of the sampled label; outputting, to a graphical user interface, a candidate sequence for appending to the input sequence, comprising outputting at least one of: the first output sequence from the first iteration; and an extended output sequence, the extended output sequence including the first output sequence from the first iteration and a respective subsequent output sequence from each of at least one subsequent iteration appended thereto, wherein in each of the at least one subsequent iteration, the subsequent output sequence is generated from the reduced directed graph as a candidate for appending to an extended input sequence, the extended input sequence for the subsequent iteration being a document sequence generated by appending the first output sequence and each subsequent output sequence of each prior subsequent iteration to the received input sequence. 4. The method of claim 1 , wherein the method further comprises generating the reduced directed graph from an input directed graph by application of at least one reduction rule to the input directed graph, the input directed graph being generated from the n-gram statistics.