Retrieve the relevant words. Uses cached version when possible.

@param {string} text   The text.
@param {string} locale The locale.

@returns {Object} The relevant words.
function getRelevantWords( text, locale ) {
	if ( ! isEqual( text, previousRelevantWords.text ) || ! isEqual( locale, previousRelevantWords.locale ) ) {
		previousRelevantWords = {
			text,
			locale,
			data: calculateRelevantWords( text, locale ),
		};
	}
	return previousRelevantWords.data;
}