A package to strip punctuation from text via a file or a basic string.
Project description
PunctuationStripper
PunctuationStripper is a Python package that can be used to strip punctuation from a file. It is easy to use and can be installed via pip:
pip install punctuationstripper
Once installed, you can use the punctuationstripper
command to strip punctuation from a file. The basic syntax is:
punctuationstripper -f [-n ] [-p ]
where:
<filename>
is the name of the file that you want to strip of punctuation.<newfilename>
is the name of the new file that you want to save the stripped text to. If you do not specify a new filename, the program will save the stripped text to a new file named<filename>_new.txt
.<punct>
is a string of characters that you do not want to strip from the text. For example, if you want to keep all periods and commas in the text, you would specifypunct=".,"
.
For example, to strip all punctuation from the file my_file.txt
and save the stripped text to a new file named my_file_new.txt
, you would use the following command:
punctuationstripper -f my_file.txt -n my_file_new.txt
You can also use the -p
option to specify a string of characters that you do not want to strip from the text. For example, to strip all punctuation from the file my_file.txt
(and save it as `my_file_new.txt) except for periods and commas, you would use the following command:
punctuationstripper -f my_file.txt -p ".,"
PunctuationStripper is a powerful tool that can be used to clean up text data. It is easy to use and can be customized to meet your specific needs.
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
File details
Details for the file punctuationstripper-0.0.1.tar.gz
.
File metadata
- Download URL: punctuationstripper-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c27d5735a48a34a57dbd9afccf6133a74608efcf3824146a74de544101bd31 |
|
MD5 | dd275c34a49a6e565ae1fe112a90f636 |
|
BLAKE2b-256 | 963fa30115d6c1c608c724e763776cd024a147df3053949547bbdad26c39d1ec |
File details
Details for the file punctuationstripper-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: punctuationstripper-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93886fff0ace9647b6e6764367e05da9c93dc6f890f7b5c0240deb5de035fd08 |
|
MD5 | 3449f9f4fddaafe7f8074517baa2bd80 |
|
BLAKE2b-256 | d98f6d0f6422493a54ccde94bf235d7e7e5632e75ec4f070d6fa965702940557 |