Socket
Socket
Sign inDemoInstall

transcript-parser

Package Overview
Dependencies
2
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    transcript-parser

Parses plaintext speech/debate/radio transcripts into JavaScript objects.


Version published
Weekly downloads
2
decreased by-84.62%
Maintainers
1
Install size
2.15 MB
Created
Weekly downloads
 

Readme

Source

transcript-parser

Build Status

Description

Parses plaintext speech/debate/radio transcripts into JavaScript objects. It is still in early development and is not stable. Pull requests are welcome.

Usage

npm install transcript-parser

const fs = require('fs');
const TranscriptParser = require('transcript-parser');
const tp = new TranscriptParser();

//Do not use readFileSync in production
const output = tp.parseOne(fs.readFileSync('transcript.txt', {encoding: 'UTF-8'}));
console.log(output);

Config

The constructor for TranscriptParser accepts an options argument.

Options:

  • removeActions
    • default: true
    • Specifies if the parser should remove actions (e.g. "(APPLAUSE)").
  • removeAnnotations
    • default: true
    • Specifies if the parser should remove annotations (surrounded by []).
  • removeTimestamps
    • default: true
    • True if removeAnnotations is true
    • Specifies if the parser should remove timestamps (in the [##:##:##] format).
  • removeUnknownSpeaker
    • default: false
    • Specifies if the parser should remove lines that have no associated speaker.

Documentation

.parseOne()

The parseOne() method parses a string and returns an object representing it.

Syntax

tp.parseOne(_transcript_)

Parameters
  • transcript
    • The transcript, as a string.

Keywords

FAQs

Last updated on 22 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc