egotist vs know-everything

egotist

noun
  • A person who believes in his or her own importance or superiority. 

  • A person who talks excessively about themself. 

  • An egoist (advocate of egoism). 

know-everything

noun
  • A highly knowledgeable person; expert. 

  • Synonym of know-it-all 

How often have the words egotist and know-everything occurred in a corpus of books? (source: Google Ngram Viewer )