This program is capable of splitting English text into individual words and can focus on learning unfamiliar words through its filtering feature..
Project description
英文单词书制作
介绍
这是一个自然语言处理工具集,主要用于文本处理、分词、词形还原等任务。该工具集可以处理英文文本,提取英文文本中的单词生成单词书,并支持文本的批量处理和保存。
安装教程
pip install -r requirements.txt
或者, 当前需要在官方源
pip install build_vocabulary
使用说明
usage: main.py [-h] [-r DIRECTORY] [-t TEXT] [--info] [-s START] [-e END] [-i]
[-f FILE_FILTER] [--record_exclude] [--exclude]
[file_path]
这个程序能够将英文文本拆分成单个单词,并可以通过过滤功能来专注于学习不熟悉的单词。
positional arguments:
file_path 指定单个文件的路径,该文件可以是pdf、pptx、docx或文本格式。如果未指定,程序将等待进一步的指令。
optional arguments:
-h, --help show this help message and exit
-r DIRECTORY, --directory DIRECTORY
指定一个文件夹路径,程序将会处理该文件夹内所有支持的文本文件。
-t TEXT, --text TEXT 直接提供一大段文本进行处理,而不是通过文件路径。
--info 显示已经学过的单词的位置
-s START, --start START
在处理单个文件或大段文本时,指定正则表达式匹配的起始点。留空则从文本的开始处处理。
-e END, --end END 在处理单个文件或大段文本时,指定正则表达式匹配的结束点。留空则处理到文本的结束处。
-i, --integrate 在指定一个文件夹路径时, 是否将该文件夹内所有的结果整合到一起。
-f FILE_FILTER, --file_filter FILE_FILTER
指定一个文件路径,程序会在最终生成的单词列表中排除掉这个文件中出现的单词。
这个选项适用于想要创建一个不含特定单词的单词列表的情况。
--record_exclude 将任意方式生成的词汇表写到文件里,下次生成词汇表时,使用--exclude来激活排除。
该单词本中的词汇将不会再出现再新的词汇表里。使用--info可以查看不被包括的单词。
--exclude 激活排除。
或者安装到环境后
build_vocabulary.exe
注意事项
在使用该工具集之前,请确保已经安装了所有必要的Python库。 COCA列表应该是一个文本文件,其中每行包含一个单词。 该工具集默认使用UTF-8编码处理文本。
贡献
欢迎任何形式的贡献,包括代码、文档、建议等。请通过GitHub上的issues或者pull requests与我联系。
许可证
该软件使用MIT许可证发布。请确保在分发或使用该软件时遵守相应的许可协议。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file build_vocabulary-0.1.7.tar.gz.
File metadata
- Download URL: build_vocabulary-0.1.7.tar.gz
- Upload date:
- Size: 292.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3c2c91062fdcae11409e105aa29366a4e942eabb8e5c348c592b2075c72ce6e
|
|
| MD5 |
7a2eecf07cee4f58a2135c460d05c02a
|
|
| BLAKE2b-256 |
f94ed03d676a287ec0085244a2e29aa9767d5a24fcf36e7a6ad5492162da30aa
|
File details
Details for the file build_vocabulary-0.1.7-py3-none-any.whl.
File metadata
- Download URL: build_vocabulary-0.1.7-py3-none-any.whl
- Upload date:
- Size: 291.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24623d70643e996d92125a394f746fce8e3fa0b498242aaf709b1821c8dbeedd
|
|
| MD5 |
5b2b3a789848a3a767d303fbb1d57304
|
|
| BLAKE2b-256 |
4235e3389685db7eb38cd996d7e1c2acacea4cdf14b5cd186dd4e0db0fbac2ef
|