Sentence case in German

A tough challenge for a hand coded algorithm but I reckon maybe it’s easy for a generative AI. I took my GPT-3 extension and modified it thus:

// #popclip
// name: DE Sentence (OpenAI)
// icon: circle de
// language: javascript
// after: paste-result
// entitlements: [network]
// options: [{identifier: apikey, label: API Key, type: string,
//   description: 'Obtain API key from'}] 
const openai = require("axios").create({
  baseURL: '',
  headers: { Authorization: `Bearer ${popclip.options.apikey}` }
const { data } = await'edits', {
  model: 'text-davinci-edit-001',
  input: popclip.input.text,
  instruction: "Render this sentence with correct German capitalization"
return data.choices[0].text;

(The above block is an extension snippet - select the text it then click “Install Extension” when PopClip appears.)

Please note you will need to sign up for an account with OpenAI via, and then get your API key from to insert in the extension config.

Testing it with the following sentence:

können sie mir helfen? ich feiere meinen geburtstag.

Können Sie mir helfen? Ich feiere meinen Geburtstag.

CleanShot 2023-02-22 at 12.45.23

So there we go! Looks promising.

1 Like