Skip to main content

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

License: CC BY 4.0

Metadata

Release files for evmotosentiment 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evmotosentiment 0.3.0
File Size Uploaded
evmotosentiment-0.3.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evmotosentiment 0.3.0
File Interpreter ABI Platform
evmotosentiment-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / evmotosentiment-0.3.0.tar.gz

Download URL evmotosentiment-0.3.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4ca8535ec0a828ce7a4b4f12962044b27de53fb54ffe99cc30dfc5f9000bce46
BLAKE2b-256 checksum
How to use checksums
9f29689822a184561310412c88dc6fff938d3ade0701ab9869d3769efd706bde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / evmotosentiment-0.3.0-py3-none-any.whl

Download URL evmotosentiment-0.3.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f252722b7c97b3e50d9f3229ecfe27f747ba9fbd60cab8edcf489ac1f32c13f
BLAKE2b-256 checksum
How to use checksums
8cd55564ef632e24a0cc79d3f0c957764313ae78ab9ee297b2bcdcee43649acd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page