1. A method for identifying a table of contents in a document, the method comprising: deriving an ordered sequence of text fragments from the document; defining links between pairs of text fragments satisfying a textual similarity criterion, each link including a source text fragment and a target text fragment; selecting from amongst the ordered sequence of text fragments a table of contents including a contiguous sub-sequence of the ordered sequence of text fragments, text fragments of the table of contents defining entries each having an optimized target text fragment selected from links that include the entry as the source text fragment, the selected table of contents being optimized with respect to criteria including at least (i) providing an ascending ordering for the optimized target text fragments, and (ii) providing that no entry has an optimized target text fragment that is included in the selected table of contents.