Do axe/polearm infantry get a bonus vs spears/pikes, or do only sword infantry get that bonus?

Do cavalry units get a bonus vs. axe/polearm infantry, or do they only get that bonus vs sword infantry?

I always thought these bonuses only applied to sword infantry, but somebody told me they apply to axe/polearm infantry too.