Man accused of sword attack