Socket
Socket
Sign inDemoInstall

schenkerian

Package Overview
Dependencies
170
Maintainers
6
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    schenkerian

a HTML keyword analyzer


Version published
Weekly downloads
0
decreased by-100%
Maintainers
6
Created
Weekly downloads
 

Readme

Source

CircleCI Code Climate

HTML Schenkerian analyzer

Greenkeeper badge

Schenkerian analysis is a method of musical analysis by interpreting the underlying structure of a tonal work and to help reading the score according to that structure.

This library is that, but for HTML built on top of Natural Node which includes term frequency, string similarities, and tokenizing. Given most webpages (attempt) to use the semantics of HTML, it takes into account not only term frequency, but the weight of an HTML tag, placement in document, and other useful forms of denoting significance (like Open Graph).

Install

$ npm install schenkerian --save

Usage

var analyze = require('schenkerian')

analyze({
  url: 'http://dustindiaz.com',
  body: '<html>...</html>' // optional. if absent, the module will `request` the given webpage
})
.then(function (result) {
  console.log(result)
})

output

{
"totalWords": 637,
"permalink": "http://dustindiaz.com/",
"title": "Dustin Diaz",
"relevance": [
    {
      "word": "javascript",
      "score": 1.074,
      "count": 47
    },
    {
      "word": "ender",
      "score": 0.571,
      "count": 25
    },
    {
      "word": "follow",
      "score": 0.228,
      "count": 10
    },
    {
      "word": "css",
      "score": 0.228,
      "count": 10
    },
    {
      "word": "qwery tiny selector",
      "score": 0.14,
      "count": 3
    },
    {
      "word": "open submodule library",
      "score": 0.14,
      "count": 3
    },
    {
      "word": "js open submodule",
      "score": 0.14,
      "count": 3
    },
    {
      "word": "ender js open",
      "score": 0.14,
      "count": 3
    },
    {
      "word": "mvc framework node",
      "score": 0.14,
      "count": 3
    },
    {
      "word": "tiny selector engine",
      "score": 0.14,
      "count": 3
    }
  ]
}

Keywords

FAQs

Last updated on 02 Sep 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc