
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
This is a simple library for extracting keywords from a text. It is based on the TF-IDF algorithm for extracting keywords. Beside, it also uses the YAKE and RapidFuzz libraries.
Fast and easy to use. But it still works better than the other libraries I've tried. I think so (●´ω`●).
If you have any complain, my mail here (>‘o’)>: trinhhungsss492@gmail.com. Or my facebook here (。◕‿◕。): https://www.facebook.com/trinhdoduyhungss.
Download and install through pip with wheel support:
pip install kwextractor
from kwextractor.process.extract_keywords import ExtractKeywords
from kwextractor.process.extract_numverse import ExtractNumverse
from kwextractor.process.replacing_w2n import ReplacingWtoN
keywords = ExtractKeywords().extract_keywords("tôi thích nghe các bản nhạc của Trịnh Công Sơn")
print(keywords) # "bản nhạc,Trịnh Công Sơn"
num_verse = ExtractNumverse().extract_numverse("sinh cho tui bài thơ gồm hai chục câu nhé",20) #20 is the maximum value returned. It can be any integer number, you can set it fit your need.
print(num_verse) # 20
replacing_w2n = ReplacingWtoN().replacing_w2n("cho hỏi làm sao để sinh ra mười bài thơ")
print(replacing_w2n) # "cho hỏi làm sao để sinh ra 10 bài thơ"
keywords = ExtractKeywords().extract_keywords("Tổng thống Mỹ Donald Trump đã đề nghị các nước thành viên NATO tăng cường đầu tư trong lĩnh vực an ninh, đặc biệt là trong lĩnh vực phòng chống tấn công từ các quốc gia có thể xâm nhập vào các thành phố của các nước thành viên. Đây là lần đầu tiên tổng thống Mỹ đề nghị các nước thành viên NATO tăng cường đầu tư trong lĩnh vực an ninh.")
print(keywords) # "cường đầu,quốc gia,xâm nhập,ninh đặc,an ninh,Donald Trump,Tổng thống lĩnh vực phòng chống tấn công,NATO"
🤘 Version v0.0.3: Customize is available now🤘
from kwextractor.process.extract_keywords import ExtractKeywords
text = "tôi thích nghe các bản nhạc của Trịnh Công Sơn"
fake_data = {
"author": [
"Trịnh Thăng Bình",
"Lê Bảo Bình",
"Phan Mạnh Quỳnh",
"Karik",
"Ngô Kiến Huy",
"Chí Tâm",
"Trang Yue",
"B Ray",
"ERIK",
"Emcee L (Da LAB)",
"Badbies",
"Vũ",
"Sơn Tùng M-TP"
]
}
kw = ExtractKeywords(lan='vi', data_keywords=fake_data, return_group=True) # all parameters: data_keywords, lan, ngram, stop_words
print(kw.extract_keywords(text)) #{'author': ['bản nhạc', 'Trịnh Công Sơn']}
Feature | Description | Available at version |
---|---|---|
🍎 Extract keywords from a sentence | Extract keywords from a sentence. If the sentence has more than one keyword, the keywords will be separated by a comma. And empty if the sentence has no keyword. | ✅ v0.0.1 ⇪ |
🍎 Extract keywords from a paragraph | Extract keywords from a paragraph and return a list of keywords | ✅ v0.0.2 ⇪ |
🍎 Extract num-string from a sentence | Extract num-string (number as text) from a sentence. Only return 1 number as a integer in a sentence. | ✅ v0.0.1 ⇪ |
🍎 Replace num-string with a number | Replace num-string with a number in the sentence. | ✅ v0.0.1 ⇪ |
pip install -r requirements.txt
python setup.py bdist_wheel
pytest
Any question? (ு८ு)
_/﹋\_
(҂`_´)
<,︻╦╤─ ҉ – – 🍎
_/﹋\_
FAQs
Extract keywords for vietnamese text.
We found that kwextractor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.