The Hausdorff dimension of recurrent sets in symbolic spaces