@flatfile/plugin-enrich-summarize
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.17latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.17
0.3.02
0.2.02
0.1.02
0.0.01

Package Sidebar

Install

npm i @flatfile/plugin-enrich-summarize

Weekly Downloads

2

Version

0.3.1

License

ISC

Unpacked Size

25.6 kB

Total Files

12

Last publish

Collaborators

  • sarocu
  • dboskovic
  • nate.ferrero
  • jmmander
  • madmandrit
  • bangarang
  • carlbrugger
  • flatfileinfra
  • flatderek
  • bigcountrycrane
  • flatfilecolin
  • alnoor
  • rjhyde
  • sambarrowclough
  • meritmalling
  • mmccooyyy