Anisotropically large anomalous and topological Hall effect in a kagome magnet