have knowledge of vs have learned by heart

have knowledge of

have learned by heart

How often have the words have knowledge of and have learned by heart occurred in a corpus of books? (source: Google Ngram Viewer )