Skip to main content

This program is capable of splitting English text into individual words and can focus on learning unfamiliar words through its filtering feature..

Project description

# 英文单词书制作

### 介绍
这是一个自然语言处理工具集,主要用于文本处理、分词、词形还原等任务。该工具集可以处理英文文本,提取英文文本中的单词生成单词书,并支持文本的批量处理和保存。


### 安装教程

```bash
pip install -r requirements.txt
```
或者, 当前需要在官方源
```bash
pip install build_vocabulary
```

### 使用说明
```bash
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 激活排除。
```
或者安装到环境后
```bash
build_vocabulary.exe
```
### 注意事项
在使用该工具集之前,请确保已经安装了所有必要的Python库。
COCA列表应该是一个文本文件,其中每行包含一个单词。
该工具集默认使用UTF-8编码处理文本。
### 贡献
欢迎任何形式的贡献,包括代码、文档、建议等。请通过GitHub上的issues或者pull requests与我联系。
### 许可证
该软件使用MIT许可证发布。请确保在分发或使用该软件时遵守相应的许可协议。

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

build_vocabulary-0.1.4.tar.gz (289.6 kB view details)

Uploaded Source

Built Distribution

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

build_vocabulary-0.1.4-py3-none-any.whl (290.5 kB view details)

Uploaded Python 3

File details

Details for the file build_vocabulary-0.1.4.tar.gz.

File metadata

  • Download URL: build_vocabulary-0.1.4.tar.gz
  • Upload date:
  • Size: 289.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.10

File hashes

Hashes for build_vocabulary-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1067c9157938b0229b363e00ac34e118a84f41d16255b33c42101ee8661bc77e
MD5 345119f5eb2451b06e646bff1e695c5e
BLAKE2b-256 00361dc6ff93035e9d12a07209c9f5c9f6df385dd21a3d8705577efb5dfbb503

See more details on using hashes here.

File details

Details for the file build_vocabulary-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for build_vocabulary-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eba122dac1c5dc3663198fbc4eeb5f007df98cd33977bd723d46df92f1ec1551
MD5 da5116929932b50eee42dc822c157152
BLAKE2b-256 8d9fbeb5123a300e1336793e79a371c442241a3ced682a66ed752f578822a932

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