Friday, January 5, 2024

Automatic Grammar Agreement

WWDC 2021:

Discover how the latest updates to Foundation can help you improve your app's localization and internationalization support. Find out about the new AttributedString, designed specifically for Swift, and learn how you can use Markdown to apply style to your localized strings. Explore the grammar agreement engine, which automatically fixes up localized strings so they match grammatical gender and pluralization.

WWDC 2023:

Discover how you can use automatic grammatical agreement in your apps and games to create inclusive and more natural-sounding expressions. We’ll share best practices for working with Foundation, showcase examples in multiple languages, and demonstrate how to use these APIs to enhance the user experience for your apps.

George Rhoten (video):

Formatting messages to display in a user interface has improved in capability over the years. For example, CLDR and ICU have provided the ability to format dates and numbers for various languages and regions. They have provided the capability to choose the correct singular, dual and plural forms of phrases for various languages. They have provided the capability to choose the correct grammatical gender or natural gender of phrases for various languages. Much of this functionality works well when the set of words used in the message are known when translating into another language. Unfortunately, the available message formatting frameworks fail to create grammatically correct sentences when messages reference user defined vocabulary. We present Automatic Grammar Agreement - a feature which was developed to overcome these challenges. It allows messages to have grammatically correct nouns, adjectives, articles and prepositions with minimal input from localizers.

Via Marcin Krzyzanowski:

Automatic Grammar Agreement deserves detailed documentation. I learned waaay more from (random) presentation for Unicode Consortium than from Apple dev rel/docs

Comments RSS · Twitter · Mastodon

Leave a Comment