The idea of parts of speech has to do with grammatical
categories such as nouns and verbs and adjectives. It does not
include synonyms. Synonyms are words (and in that sense, they are
literally parts of speech) but they do not form a grammatical
category. They are just a category of words that is used to help
understand what words mean, or to help you to find alternative ways
of saying something, to avoid being repetitious or cliche.