The invention relates to a method and a device for obtaining synonyms. The method comprises: obtaining a text set, performing word segmentation on the text set to generate a first term set; filtering null words of the first term set through a stop
word list, to generate a second term set; performing distance editing
processing on any two words in the second term set, to generate a first
synonym set; establishing a
vector space model on the words in the first term set; according to the model, obtaining space vectors of each pair of synonyms, calculating
cosine similarity value of each pair of synonyms, performing cosine threshold
filtration strategy identification on each pair of synonyms, to generate a second
synonym set; performing part-of-speech tagging on the words in the second
synonym set, to generate a third synonym set; and
processing the words in the third synonym set by a unary model, to obtain synonyms. Thus, the method and the device realize that retrieved synonyms are more accurate, and ambiguous words and null words do not exist, so as to intelligently retrieve related webpage of synonyms.