We’ve all got used to autocorrect – that app and software function that can be handy and just as often be frustrating, changing what we meant to type into something else entirely.

‘Damn You, Autocorrect!’ has become a common phrase, a meme, a song and even a book as people have shared the unintentionally hilarious ‘corrections’ that the process frequently throws up.

There are certain words and phrases that have been more prone than others to erroneous correction and the common swear word that rhymes with ‘ducking’ is one.

Artificial intelligence (AI) will soon be able to discern whether you actually mean to use the expletive, however.

If you’re writing about ducking for apples, that’s all well and good, but if you want to use the swear word, the AI should be able to tell from the context.

Craig Federighi, Apple’s software chief, announced the upcoming change at a developers’ conference in California.

The function will use a deep learning AI model known as a transformer.

This type of model is able to learn context and meaning by tracking relationships in sequential data like the words in a sentence.

The changes to autocorrect will be part of Apple’s iOS 17 operating system upgrades, which should appear as a public beta in July before being made fully available in September.

The developers’ conference also saw the public unveiling of the augmented reality headset, Apple Vision Pro, which should be available early next year.