Summarizer: expectedInputLanguages property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
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 (as specified in RFC 5646).
Examples
js
const summarizer = await Summarizer.create({
expectedInputLanguages: ["en-US", "fr"],
// ...
});
// Logs "en-US"
console.log(summarizer.expectedInputLanguages[0]);
Specifications
Specification |
---|
Writing Assistance APIs # dom-summarizer-expectedinputlanguages |
Browser compatibility
See also
- Using the Summarizer API
- Web AI demos on chrome.dev