The Nigerian army says it has succeeded in chasing Boko Haram fighters from some of the territory they held.