1.0.24 • Published 6 years ago

improvise-on-slots v1.0.24

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

improvise-on-slots

Given slots, fill each in with pieces of text that relate to each other.

Installation

npm install --save improvise-on-slots

Usage

var Improvise = require('improvise-on-slots');
var improvise = Improvise({ wordnikAPIKey: config.wordnik.apiKey });

var opts = {
  keyType: 'Wu-Tang Clan member',
  keys: ['RZA', 'GZA', 'Inspectah Deck', 'Masta Killa', 'U-God', 'Ol\' Dirty Bastard', 'Method Man', 'Raekwon', 'Ghostface Killah'],
  method: 'wikipedia-categories'
};
improvise(opts, logResult);

function logResult(error, dict) {
  if (error) {
    console.log(error);
  } else {
    console.log(dict);
  }
}

Output:

{ 
  theme: 'Journalism adapted into films',
  title: 'Favorite Journalism adapted into films by Wu-Tang Clan member',
  slots: {
    RZA: 'Phantom (2015 film)',
    GZA: 'Kavan (film)',
    'Inspectah Deck': 'Bangaram (film)',
    'Masta Killa': 'Mission Istaanbul',
    'U-God': 'News (film)',
    'Ol\' Dirty Bastard': 'Kanithan',
    'Method Man': 'Ism (film)',
    Raekwon: 'Ism (film)',
    'Ghostface Killah': 'Vangaveeti (film)'
  } 
}

Possible method values:

'wikipedia-categories',
'related-words',
'verbal-rating-of-keys',
'verbal-rating-of-topic',
'counts-of-topic',
'ranking-of-keys'

License

The MIT License (MIT)

Copyright (c) 2018 Jim Kang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago