It depends on how well trained the ninja is. I would guess probably the boar. Even if the ninja wins he might still get rabies if he got hurt during the fight.
Boar. A ninja without weapons could only attack it here and there, and hold its tusks to prevent it from biting him/her, but that’s about it and they most likely won’t kill it before the boar bites him/her.