specrom

specrom / ExtractKeywordsfromText / 0.2.0

README.md

Overview

Applicable Scenarios and Problems

Usage

Input

Output

Examples


{ "documents": [
    { "id": "1", "text": "Late in the 21st century, man develops artificial intelligence (referred to simply as the Machines). The Machines take control of Earth. Man fights back." },
    { "id": "2", "text": "Don Vito Corleone, head of a mafia family, decides to hand over his empire to his youngest son Michael. However, his decision unintentionally puts the lives of his loved ones in grave danger." },
    { "id": "3", "text": "During WWII, Rick, a nightclub owner in Casablanca, agrees to help his former lover Ilsa and her husband. Soon, Ilsa's feelings for Rick resurface and she finds herself renewing her love for him."}]}

the output is

{
  "documents": [
    {
      "id": "1",
      "keywords": [
        "man",
        "intelligence"
      ]
    },
    {
      "id": "2",
      "keywords": [
        "family",
        "corleone",
        "unintentionally",
        "son"
      ]
    },
    {
      "id": "3",
      "keywords": [
        "rick",
        "ilsa",
        "soon"
      ]
    }
  ]
}