Formal annotation describing what a document is about is needed in order to make large numbers of documents accessible in service-oriented environments such as e-science grids or the samantic web. The most fashionable way of obtaining annotations is via extraction from textual documents in natural language. This potentially is valuable because of the quantity of natural language documents available but in practice it is difficult to design algorithms that reliably extract annotations from these sorts of documents. An alternative form of document is one which is already formal but lacks annotation. Program source code normally is like this. I shall discuss how we might extract different sorts of annotations from Prolog source code - Prolog being in some respects an "easy" language to attack. In the course of the discussion I hope to cover Clark completion, slicing and a probabilistic similarity measure - all of which have relevance to the annotation problem.