Then your query would just be
SELECT whatever FROM keyword AS K
INNER JOIN keyword_group as KG ON K.keyword_id = KG.keyword_id
INNER JOIN article_group AS AG ON KG.group_id = AG.group_id
INNER JOIN article AS A ON AG.article_id = A.article_id
WHERE K.word = '" . $search_term . "'"
Basically you need a way to group an article with a group and a group with a word. I didn't put anything in the query to return cases where an article is directly associated with a word in the article_keyword table but thats easy enough to do.