A man wielding a samurai sword has sparked a police operation in Sydney’s west, with an officer suffering a cut to the leg during the incident.