Summarizer: expectedInputLanguages property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
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