1. A method for generating an ontology, comprising: selecting, by a processing device, a tag in a tag cloud; searching, by the processing device, an online encyclopedia for content corresponding to the selected tag; determining a number of web pages associated with the selected tag, wherein searching the online encyclopedia for content corresponding to the selected tag comprises searching the online encyclopedia in response to the number of web pages associated with the selected tag exceeding a preset threshold; determining, by the processing device, at least one category to which the content belongs in the online encyclopedia in response to finding the content corresponding to the selected tag in the online encyclopedia; and adding, by the processing device, a class to the ontology corresponding to the at least one category of the content in the online encyclopedia.