Package to analyse Motorcycle EV swap related issues
Project description
Motoevsentiment
A package for extracting and analyzing sentiment from EV motorcycle feedback provided by customers and employees.
Source Code
The full source code for this project is available on GitHub.
wsentiment subpackage
This subpackage analyses WhatsApp related messages for sentiment.
Using wsentiment
import by using
from evmotosentiment.wsentiment import wsentiment_score
wsentiment_score takes only string inputs.
- example
wsentiment_score('kofi has lights out')
>> -2
wdataframe
This subpackage changes WhatsApp text export file (.txt) into a dataframe
Using wdataframe
import using
from evmotosentiment.wsentiment import wdataframe
- example
# Suppose you have a text file with data
test_file = "sample.txt"
# Read the text file into a Pandas DataFrame
df = wdataframe(test_file)
# Display the DataFrame
print(df)
datetime sender message
0 2023-09-29 07:49:00 John Doe ok
1 2023-09-29 08:15:00 Jane Doe swapped battery
preprocess_text
This subpackage is used to clean text. The cleaning removes words that do not add to the sentiment analysis such as "the,me, etc"
Using preprocess_text
import using
from evmotosentiment.clean_message import preprocess_text
- example
preprocess_text('Turning swap station off at Haatso')
>> 'turning swap station off haatso'
Running using pytest
To run tests in your current Python environment:
pytest
Running Tests with Tox
This project uses Tox to automate testing across multiple Python versions.
Test Environments
The tox.ini is configured to run tests with:
- Python 3.9
- Python 3.10
- Python 3.11
Each environment installs:
pytest(for running tests)pandas(project dependency)
Prerequisites
- Python 3.9, 3.10, and 3.11 installed on your system
- uv for faster installs (optional but recommended)
- Install tox with uv:
uv pip install tox tox-uv
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 evmotosentiment-0.3.0.tar.gz.
File metadata
- Download URL: evmotosentiment-0.3.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca8535ec0a828ce7a4b4f12962044b27de53fb54ffe99cc30dfc5f9000bce46
|
|
| MD5 |
ccb6b81282d4f149a94fc8d94ab89ece
|
|
| BLAKE2b-256 |
9f29689822a184561310412c88dc6fff938d3ade0701ab9869d3769efd706bde
|
File details
Details for the file evmotosentiment-0.3.0-py3-none-any.whl.
File metadata
- Download URL: evmotosentiment-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f252722b7c97b3e50d9f3229ecfe27f747ba9fbd60cab8edcf489ac1f32c13f
|
|
| MD5 |
9cf74a6929dff4128035f14bda4f2289
|
|
| BLAKE2b-256 |
8cd55564ef632e24a0cc79d3f0c957764313ae78ab9ee297b2bcdcee43649acd
|