Only the category ID is given. So to get the category, you'd need a mysql query:
$query = "SELECT title FROM #__categories WHERE id = ".intval($article->catid)." LIMIT 1";
$database->setQuery($query);
$category = $database->loadResult();
The variable $category should now have the category title so the text looks like.
$custom_text = 'this '.$article->title.' belongs to '.$category;