have a grasp of vs have learned by heart

have a grasp of

have learned by heart

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