This plugin provides automatic text summarization capabilities for Flatfile using natural language processing. It uses the compromise library to generate summaries and extract key phrases from specified fields.
Event Type: commit:created
Supported Field Types: string
- Automatic text summarization
- Key phrase extraction
- Configurable summary length or percentage
- Custom field mapping for content, summary, and key phrases
- Error handling for missing content
The slug of the sheet to apply summarization.
The field containing the full text content.
The field to store the generated summary.
The field to store extracted key phrases.
Number of sentences in the summary. Default is 2.
Percentage of content to include in summary.
install
npm install @flatfile/plugin-enrich-summarize
import
import { FlatfileListener } from "@flatfile/listener";
import { summarize } from "@flatfile/plugin-enrich-summarize";
listener.js
const listener = new FlatfileListener();
listener.use(
summarize({
sheetSlug: "articles",
contentField: "full_text",
summaryField: "summary",
keyPhrasesField: "key_phrases",
summaryLength: 3
})
);