1. An analysis device for analyzing a text document, the analysis device comprising: a memory having computer readable instructions; and a processor for executing the computer readable instructions, the computer readable instructions comprising: reading the text document from an external source; forming context information by analyzing the text document for sentences based on punctuation marks and contents of words or language in the sentences to determine a position of a character set of a predetermined context in the text document; storing the context information to a context storage unit; storing in an index storage unit, 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; inputting a target word; detecting from the index information read from the index storage unit, a position of the target word contained in the text document; detecting an appearance frequency of the target word per each type of context in the text document based on comparing the position of the target word with the position of the character set of the predetermined context from the context information stored in the context storage unit, and counting a quantity of context information occurrences for each type of context in the text document for the target word; and outputting the appearance frequency for each type of context in the text document for the target word based on the position of the target word and the context information.