Function wordErrorRate