Summarizer: expectedInputLanguages property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The expectedInputLanguages read-only property of the Summarizer interface returns the languages the Summarizer should support.

Value

An array of strings specifying the languages the Summarizer should support.

The strings should be valid BCP 47 language tags.

Examples

js
const summarizer = await Summarizer.create({
  expectedInputLanguages: ["en-US", "fr"],
  // ...
});

// Logs "en-US"
console.log(summarizer.expectedInputLanguages[0]);

Specifications

See also