Weapon Training (Ex): Starting at 5th level, a fighter can select one group of weapons, as noted below. WHENEVER he attacks with a weapon from this group, he gains a +1 bonus on attack and damage rolls.
Weapon training cares about the weapon, not the manner in which you use it. It would apply to melee and ranged attacks with the dagger, just as weapon focus/specialization does.