0.1.1 • Published 4 years ago

recommend-me v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

@recommend-me

Recommend me is a content based recommendation engine. You can use it to get recommendations based on input string provided. This ML based engine trains on your own custom dataset.

Notes on Dataset:

  1. It only supports JSON datasets in current version
  2. If you have csv dataset try using free utilities online to convert to json dataset
  3. Current version looks for 'data.json' file for training directly under the root of your project. One example of dataset could be as follows:
[
  {
    "key":"snapchat.com",
    "metaData": "social media one of the principal features of Snapchat is that pictures and messages are usually only available for a short time before they become inaccessible to their recipients "
  },
  {
    "key":"facebook.com",
    "metaData": "social media website  messaging and chat"
  },
  {
    "key":"twitter.com",
    "metaData": "social media celebrities chat and messaging"
  },
  {
    "id":"web.whatsapp.com",
    "metaData": "social media chat video chat"
  }
]

Install

Add to your project by running:

npm install recommend-me

Properties

NameTypeDescriptionDefault Value
strstringString for which you wish to get recommendations .Required
idstringname of unique key field in your dataset, e.g in above dataset value for id is 'key'.Required
contentstringcontent which describes your unique key field, e.g in above dataset value for id is 'metaData'.Required

Usage

const recommendationEngine = require('recommend-me');
recommendationEngine('twitter.com', dataSetURL).then(function(response){
    console.log(response);
});