0.2.0 • Published 8 months ago

@flatfile/plugin-enrich-summarize v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

@flatfile/plugin-enrich-summarize

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

Features

  • 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

Parameters

sheetSlug - string - (required)

The slug of the sheet to apply summarization.

contentField - string - (required)

The field containing the full text content.

summaryField - string - (required)

The field to store the generated summary.

keyPhrasesField - string - (required)

The field to store extracted key phrases.

summaryLength - number - (optional)

Number of sentences in the summary. Default is 2.

summaryPercentage - number - (optional)

Percentage of content to include in summary.

Usage

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
  })
);
0.2.0

8 months ago

0.1.0

8 months ago

0.0.0

8 months ago