New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

phonghng-url-kw-extractor

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonghng-url-kw-extractor

Extract keyword from any url in many languages

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Intro

Support over 60 languages and if you want to add more language, just add their stopwords in stopwords.json

Usage

Install via npm:

npm install phonghng-url-kw-extractor 

Let's code:

var uke = require("phonghng-url-kw-extractor");

/* Get support languages */
var sl = uke.support_lang;
console.log(sl); // return an array with languages supported

/* Extract keyword from url */
var url = "https://example.com";
uke.get_keyword(url, keywords => {
	console.log(keywords); //return an object with keywords and scores
});

/* Extract keyword from html */
var html = "your html here - includes doctype, html, head, body tags";
uke.get_keyword_from_html(html, keywords => {
	console.log(keywords); // return an object with keywords and scores
});

/* Extract keyword from string */
var html = "Việt Nam, tên gọi chính thức là Cộng hòa Xã hội chủ nghĩa Việt Nam, là quốc gia nằm ở cực Đông của bán đảo Đông Dương thuộc khu vực Đông Nam Á, giáp với Lào, Campuchia, Trung Quốc, Biển Đông và vịnh Thái Lan. Quốc gia này có chung đường biên giới trên biển với Thái Lan qua vịnh Thái Lan và với Trung Quốc, Philippines, Indonesia, Brunei, Malaysia qua Biển Đông. Việt Nam có diện tích 331.212 km², đường biên giới trên đất liền dài 4.639 km, đường bờ biển trải dài 3.260 km, dân số ước tính vào khoảng 98 triệu người với 54 dân tộc trong đó người Kinh chiếm đa số. Thủ đô của Việt Nam là thành phố Hà Nội, thành phố đông dân cũng như có quy mô GRDP lớn nhất là Thành phố Hồ Chí Minh (ngày nay vẫn thường được gọi phổ biến với tên cũ là Sài Gòn). Việt Nam tuyên bố chủ quyền đối với hai thực thể địa lý tranh chấp trên Biển Đông là các quần đảo Hoàng Sa (nhưng không kiểm soát trên thực tế) và Trường Sa (kiểm soát một phần)";
uke.get_keyword_from_string(string, keywords => {
	console.log(keywords); // return an array with keywords
});

Web API POST

/* Get support languages */
$.get("https://uke-api.herokuapp.com/supportlang", response.support_lang => {
	console.log(response.support_lang);
});

/* Extract keyword from url */
$.post("https://uke-api.herokuapp.com/kwurl", { url: "https://example.com" }, keywords => {
	console.log(keywords);
});

/* Extract keyword from html */
$.post("https://uke-api.herokuapp.com/kwhtml", { html: "your html here - includes doctype, html, head, body tags" }, keywords => {
	console.log(keywords);
});

/* Extract keyword from string */
$.post("https://uke-api.herokuapp.com/kwstring", { string: "Việt Nam, tên gọi chính thức là Cộng hòa Xã hội chủ nghĩa Việt Nam, là quốc gia nằm ở cực Đông của bán đảo Đông Dương thuộc khu vực Đông Nam Á, giáp với Lào, Campuchia, Trung Quốc, Biển Đông và vịnh Thái Lan. Quốc gia này có chung đường biên giới trên biển với Thái Lan qua vịnh Thái Lan và với Trung Quốc, Philippines, Indonesia, Brunei, Malaysia qua Biển Đông. Việt Nam có diện tích 331.212 km², đường biên giới trên đất liền dài 4.639 km, đường bờ biển trải dài 3.260 km, dân số ước tính vào khoảng 98 triệu người với 54 dân tộc trong đó người Kinh chiếm đa số. Thủ đô của Việt Nam là thành phố Hà Nội, thành phố đông dân cũng như có quy mô GRDP lớn nhất là Thành phố Hồ Chí Minh (ngày nay vẫn thường được gọi phổ biến với tên cũ là Sài Gòn). Việt Nam tuyên bố chủ quyền đối với hai thực thể địa lý tranh chấp trên Biển Đông là các quần đảo Hoàng Sa (nhưng không kiểm soát trên thực tế) và Trường Sa (kiểm soát một phần)" }, response => {
	console.log(response.keywords);
});

Keywords

FAQs

Package last updated on 06 Aug 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc