Skip to main content

A versatile word counting tool supporting multiple input methods

Project description

WordCounter Tool

一个多功能单词计数工具包,支持直接粘贴、多行输入和文件读取三种方式。

功能特点

  • 📝 支持直接粘贴文本统计
  • 📄 支持多行文本输入
  • 📁 支持从文件读取内容
  • 🔢 准确的单词计数算法
  • 🖥️ 友好的命令行界面

安装

pip install wordcounter-tool

使用方法

命令行使用

安装后,可以直接在命令行中使用:

wordcounter

然后按照菜单提示选择输入方式。

作为 Python 模块使用

from wordcounter_tool import count_words, count_words_from_file

# 直接统计文本
text = "Hello world, this is a test."
result = count_words(text)
print(f"单词数量: {result}")

# 从文件统计
result = count_words_from_file("example.txt")
print(f"文件单词数量: {result}")

输入方式

  1. 直接粘贴: 快速粘贴单行文本
  2. 多行输入: 支持输入多行文本,以空行结束
  3. 文件读取: 从文本文件读取内容

许可证

MIT License

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

wordcounter_tool-1.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wordcounter_tool-1.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file wordcounter_tool-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for wordcounter_tool-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3d930d35af08e5dff362efc69297f1d38ed04e0a99cf167ff0f3a9a5e977e814
MD5 4949e480bfe98b780673c5433285911f
BLAKE2b-256 6eb3329785df08dd522faaaacbeea5817ae228441e21857e186a0e57e1719338

See more details on using hashes here.

File details

Details for the file wordcounter_tool-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wordcounter_tool-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06d25297729b8c894363d9d8d9dc72fe3e0b4fbbf6330bf34b8d5a44d41617a6
MD5 cf8c05d49133a4328113ec195ab206c8
BLAKE2b-256 ffb374c4d4a0547c42cda66cb5bda83013c74dc22d57d8c42efd903e642f46da

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