New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

text-event

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-event

extract events from text

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

text-event

How to use

Setup

Install:

npm install --save text-event

Run


const TextEvent = require('text-event');

const textevent = new TextEvent();

textevent.events(content); // default: parse English text
textevent.events(content, 'zh'); // parse Chinese text

Use with wikipedia

const TextEvent = require('text-event');
const textevent = new TextEvent();
const keyword = "Brett_Kavanaugh";
textevent.wiki(keyword, 'en').then((list) => {
  console.log(list)
})

Deploy on AWS Lambda

An AWS Lambda version of this script can be found in lib/lambda.js

result format

[
  {
    "raw_dates": [ // string
      "on December 7, 1941"
    ],
    "dates": [ // Date
      "1941-12-07T05:00:00.000Z"
    ],
    "text": "The attacks killed about 500 more people than the attack on Pearl Harbor on December 7, 1941, and are the deadliest terrorist attacks in world history" // string
  },
  ...
]

Keywords

event

FAQs

Package last updated on 05 Dec 2018

Did you know?

Socket

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