Skip to main content

计算概论C课程文本分析样本、常量、词频和词云工具

Project description

cm-textlab

文本分析样本、常量、词频和词云工具,适合文本处理专题使用。

pip install cm-textlab
import cm_textlab

text = cm_textlab.load_sample_text('三国片段')
print(cm_textlab.CHINESE_PUNCTUATION)
print(cm_textlab.top_words(text, n=10))

freq = cm_textlab.word_frequency(text)
cm_textlab.save_wordfreq_csv(freq, '词频.csv')
cm_textlab.make_wordcloud(text, '词云.png')

这个库提供样本、停用词、分词和词云;学生仍然要自己写循环、字典统计、文件读取和结果解释。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cm_textlab-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file cm_textlab-1.0.0.tar.gz.

File metadata

  • Download URL: cm_textlab-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for cm_textlab-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a48697eb59c34f1a95d2e08f1213dd3692a939f4d1ba9cf15195a51a54654657
MD5 ff1bcd582ea4bfb73c51c44c858bb974
BLAKE2b-256 b452fbe6a2742912b90fcaf2e21549f850b8a0f9dbabd14b2041557338628c73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page