11. A computer program product for analyzing a text document, the computer program product comprising a computer readable non-transitory storage medium having computer readable program code embodied therewith, the computer readable program code comprising computer readable program code configured for: 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.
11. A computer program product for analyzing a text document, the computer program product comprising a computer readable non-transitory storage medium having computer readable program code embodied therewith, the computer readable program code comprising computer readable program code configured for: 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. 12. The computer program product according to claim 11 , further comprising: analyzing the text document; forming index information for each word of the plurality of words contained in the text document; and storing the formed index information.