| Name | qje5vf JSON |
| Version |
0.0.1
JSON |
| download |
| home_page | None |
| Summary | boodle oodle noodle poodle doodle moo |
| upload_time | 2024-08-09 17:12:29 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.7 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
[](https://github.com/thammo4/qje5vf_DS5111su24_lab_01/actions/workflows/validations.yml)
[](https://github.com/thammo4/qje5vf_DS5111su24_lab_01/actions/workflows/validations.yml)
## Text Processing Functions
This project includes several text processing functions in `tokenize_text.py`:
- `clean_text(input_text)`: Converts text to lowercase and removes punctuation.
- `tokenize(input_text)`: Splits text into individual words.
- `count_words(input_text)`: Counts the occurrences of each word in the text.
- `count_lines(filename)`: Counts the number of lines in a file.
- `count_total_lines(filenames)`: Counts the total number of lines across multiple files.
- `count_total_words(filenames)`: Counts the total number of words across multiple files.
- `count_raven_occurrences(filename)`: Counts occurrences of the word 'raven' (case insensitive) in a file.
### Example Usage
Here's a simple example of how to use the `clean_text` and `count_words` functions:
```python
from tokenize_text import clean_text, count_words
text = "The Raven, by Edgar Allan Poe"
cleaned_text = clean_text(text)
word_counts = count_words(text)
print(f"Cleaned text: {cleaned_text}")
print(f"Word counts: {word_counts}")
# Output:
# Cleaned text: the raven by edgar allan poe
# Word counts: {'the': 1, 'raven': 1, 'by': 1, 'edgar': 1, 'allan': 1, 'poe': 1}
### Using `make all`
To automate the setup, text download, statistics generation, and testing processes, you can use the `make all` command. This command will:
1. Set up the Python virtual environment and install the required dependencies.
2. Download the specified text files from Project Gutenberg.
3. Generate statistics about the downloaded texts, including line and word counts for "The Raven" and total counts across all downloaded texts.
4. Run the test suite to ensure all functionalities are working correctly.
To use `make all`, simply run the following command in your terminal:
```bash
make all
Raw data
{
"_id": null,
"home_page": null,
"name": "qje5vf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Thomas Hammons <qje5vf@virginia.com>",
"download_url": "https://files.pythonhosted.org/packages/cb/32/3c8bcbea8394a6be5ce4e3d96494b0545554ff1810d2e80142d4502667c1/qje5vf-0.0.1.tar.gz",
"platform": null,
"description": "[](https://github.com/thammo4/qje5vf_DS5111su24_lab_01/actions/workflows/validations.yml)\n\n[](https://github.com/thammo4/qje5vf_DS5111su24_lab_01/actions/workflows/validations.yml)\n## Text Processing Functions\n\nThis project includes several text processing functions in `tokenize_text.py`:\n\n- `clean_text(input_text)`: Converts text to lowercase and removes punctuation.\n- `tokenize(input_text)`: Splits text into individual words.\n- `count_words(input_text)`: Counts the occurrences of each word in the text.\n- `count_lines(filename)`: Counts the number of lines in a file.\n- `count_total_lines(filenames)`: Counts the total number of lines across multiple files.\n- `count_total_words(filenames)`: Counts the total number of words across multiple files.\n- `count_raven_occurrences(filename)`: Counts occurrences of the word 'raven' (case insensitive) in a file.\n\n### Example Usage\n\nHere's a simple example of how to use the `clean_text` and `count_words` functions:\n\n```python\nfrom tokenize_text import clean_text, count_words\n\ntext = \"The Raven, by Edgar Allan Poe\"\ncleaned_text = clean_text(text)\nword_counts = count_words(text)\n\nprint(f\"Cleaned text: {cleaned_text}\")\nprint(f\"Word counts: {word_counts}\")\n\n# Output:\n# Cleaned text: the raven by edgar allan poe\n# Word counts: {'the': 1, 'raven': 1, 'by': 1, 'edgar': 1, 'allan': 1, 'poe': 1}\n\n\n### Using `make all`\n\nTo automate the setup, text download, statistics generation, and testing processes, you can use the `make all` command. This command will:\n\n1. Set up the Python virtual environment and install the required dependencies.\n2. Download the specified text files from Project Gutenberg.\n3. Generate statistics about the downloaded texts, including line and word counts for \"The Raven\" and total counts across all downloaded texts.\n4. Run the test suite to ensure all functionalities are working correctly.\n\nTo use `make all`, simply run the following command in your terminal:\n\n```bash\nmake all\n\n",
"bugtrack_url": null,
"license": null,
"summary": "boodle oodle noodle poodle doodle moo",
"version": "0.0.1",
"project_urls": {
"homepage": "https://github.com/thammo4/qje5vf_DS5111su24_lab_01",
"issues": "https://github.com/thammo4/qje5vf_DS5111su24_lab_01/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7be571d788f582adaaf17b476b90b2be12ffae422b51d3c99328bfd5b3edab87",
"md5": "252ac0c17913d43a7fe46d88acd87334",
"sha256": "d39d7cdfef0602ed6f3a5527e8fd858b44ae00394459a7d5cb985b2628b9c026"
},
"downloads": -1,
"filename": "qje5vf-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "252ac0c17913d43a7fe46d88acd87334",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7877,
"upload_time": "2024-08-09T17:12:28",
"upload_time_iso_8601": "2024-08-09T17:12:28.000509Z",
"url": "https://files.pythonhosted.org/packages/7b/e5/71d788f582adaaf17b476b90b2be12ffae422b51d3c99328bfd5b3edab87/qje5vf-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cb323c8bcbea8394a6be5ce4e3d96494b0545554ff1810d2e80142d4502667c1",
"md5": "4c18229aa41a37c7d390b0ed051c842a",
"sha256": "bac8c3a417f172222d987fad7150853eb71a78e6dfb7a45e5c40642b8b2c96e5"
},
"downloads": -1,
"filename": "qje5vf-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "4c18229aa41a37c7d390b0ed051c842a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 13317,
"upload_time": "2024-08-09T17:12:29",
"upload_time_iso_8601": "2024-08-09T17:12:29.876045Z",
"url": "https://files.pythonhosted.org/packages/cb/32/3c8bcbea8394a6be5ce4e3d96494b0545554ff1810d2e80142d4502667c1/qje5vf-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-09 17:12:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thammo4",
"github_project": "qje5vf_DS5111su24_lab_01",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "qje5vf"
}