@datagica/parse-interests

Extract interests from text

Stats

StarsIssuesVersionUpdatedCreatedSize
@datagica/parse-interests
000.0.113 years ago6 years agoMinified + gzip package size for @datagica/parse-interests in KB

Readme

Parse Interests

If an interest is missing you can create a pull request

Installation

$ npm i @datagica/parse-interests

Usage

Example:

await parse('I like cooking and karate.')

Output:

    [
      {
        "ngram": "cooking",
        "value": {
          "id": "cooking",
          "label": {
            "en": "Cooking",
            "fr": "Cuisine"
          },
          "aliases": [
            "to cook",
            "cook",
            "cooking",
            "cuisine",
            "pastries",
            "pâtisserie",
            "patisserie",
            "cuisiner",
            "cuisinier",
            "cuisinière",
            "cuisiniere",
            "faire la cuisine",
            "faire à manger",
            "cooking course",
            "cooking courses",
            "cours de cuisine"
          ],
          "category": "cooking"
        },
        "score": 1,
        "position": {
          "sentence": 0,
          "word": 2,
          "begin": 7,
          "end": 14
        }
      },
      {
        "ngram": "karate",
        "value": {
          "id": "karate",
          "label": {
            "en": "Karate",
            "fr": "Karate"
          },
          "aliases": {
            "en": [
              "karate"
            ],
            "fr": [
              "karaté"
            ]
          },
          "category": "martial-arts"
        },
        "score": 1,
        "position": {
          "sentence": 0,
          "word": 4,
          "begin": 19,
          "end": 25
        }
      }
    ]

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.