Build amazing applications quickly
Wikipedia Timeline
Named entity extraction and timeline generation from a Wikipedia article using winkNLP. Read our how to find date and time in text guide.
Get started in a wink!
Here is how you extract a timeline from any text in just a few lines of code.
Multiple Models
We have a light model for English with many more on the way! Looking for something domain specific, or for a particular language? Feel free to get in touch!
All the NLP you’ll need
Powerful NLP functions and helpers to get you directly what you need. Whether its POS tags , sentiment analysis, custom entities, or getting a list of frequent words, it’s all right here!
Easy to use API
An intuitive API lets you get started quick and get the results you’re looking for.
const winkNLP = require('wink-nlp');
const its = require('wink-nlp/src/its.js');
const as = require('wink-nlp/src/as.js');
const model = require('wink-eng-lite-model');
const nlp = winkNLP(model);
const doc = nlp.readDoc(text);
// This runs all core NLP tasks like
// tokenization, sentence boundary
// detection, negation handling, sentiment
// analysis, part-of-speech tagging, and
// named and custom entity extraction.
var timeline = [];
doc
.entities()
.filter( e => e.out( its.type ) === 'DATE')
.each( e => {
timeline.push({
sentence: e
.parentSentence()
.out( its.markedUpText ),
date: e.out(),
unixTime: new Date(e.out()).getTime()
})
});
timeline.sort( (a, b) => {
return a.unixTime - b.unixTime
});