Summarizer: length 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 length read-only property of the Summarizer interface returns the relative length of the generated summaries.

Value

An enumerated value specifying the relative length of the generated summaries, the exact nature of which depends on the Summarizer type value.

Possible values are:

short

A "short" summary

medium

A "medium" summary

long

A "long" summary

Examples

js
const summarizer = await Summarizer.create({
  length: "medium",
  // ...
});

// Logs "medium"
console.log(summarizer.length);

Specifications

See also