1. A computer-readable non-transitory storage medium storing therein a graph generation program that causes a computer to perform a procedure comprising: producing a database of specialized vocabulary words being respectively associated with vectors, each vector is composed of first and second elements, the first element indicating an amount that a specific specialized vocabulary word suggests comparison of data, the second element indicating an amount that the specific specialized vocabulary word suggests analysis of data; extracting a plurality of specialized vocabulary words from a title of an electronic document, with reference to the database; specifying a document purpose of the electronic document, by weighting each of the vectors associated respectively with the specialized vocabulary words based on a position of the specialized vocabulary word within the title, calculating an average of the weighted vectors associated with the extracted specialized vocabulary words in the electronic document, and determining that the document purpose is comparison of data, when the first element of the calculated average overweighs the second element of the calculated average, and determining that the document purpose is analysis of data, when the second element of the calculated average overweighs the first element of the calculated average; determining a graph type, based on the document purpose; generating a graph of the determined graph type, based on data of the electronic document; and outputting a computer file of the electronic document containing the generated graph.