You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

topicextractor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

topicextractor

Extracts keywords with 'TF-IDF' algorithm

0.0.2
pipPyPI
Maintainers
1

"topicextractor" extracts topic keywords from documents based on 'TF-IDF' algorithm.

Usage

import topicextractor as te

sample_docs = [["doc1_str"], ["doc2_str"], ["doc3_str"] ....]

#extract noun counts from 'sample_docs' count_container = te.extract_noun_counts(sample_docs)

print(count_container) [{"a": 3, "b": 2}, {"c": 5, "d":3}, {"e": 7, "f": 12} ....]

#extract keywords for 'count_container[0]'(=the first docmunet in 'sample_docs') keywords = te.tfidf(count_container[0], count_container)

print(keywords) [("keyword1", 2.1104),("keyword2" 2.0012),("keyword3", 1.8892) ....]

Thanks, and please contact the author via e-mail for any comment.

Keywords

TFIDF

FAQs

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