1. An analysis device for analyzing a text document, the analysis device comprising: a context storage unit configured to store context information that shows a position of a character set of a predetermined context in the text document; an index storage unit configured to store index information that shows a position of a word in the text document, for each word of a plurality of words contained in the text document; an input unit configured to input a target word; a position detection unit configured to detect from the index information a position of the target word contained in the text document; and a frequency detection unit configured to detect an appearance frequency of the target word per each type of context in the text document based on the position of the target word and on the context information.