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.0.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.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wordcounter_tool-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 80755a663c7bc72766d8e1afc78c119e0774a2340b95a61508c9846adf31edd9
MD5 44a5f729a9ca106ce4246cebadca238a
BLAKE2b-256 fcb39bba3011df4ab60ba70b780daaaf0e73bdbcd23d37fcac254c3e9d94e1f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wordcounter_tool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27ce5a6c516a1563d915338b0bd347e2515656f4372f1b364a3a8b5e544fc1de
MD5 b823edb486094941444fed5b6f41cf84
BLAKE2b-256 6c62fb7d4e1976202c8162a9ac0734743cee2d6e56f3607a47c94a73827b4914

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