cleaned notebooks, finished datalabelling

This commit is contained in:
charlie-rasberry
2026-02-16 12:36:29 +00:00
parent 8d3dee6d30
commit b88504725d
5 changed files with 199 additions and 64 deletions

View File

@@ -24,26 +24,28 @@ RECLASS is a multi-task learning system which uses a shared BERT encoder with ta
## Repository Structure
```
## Repository Structure
```
6013/
README.md
requirements.txt
multitag/
data/
uber_reviews.csv # Raw dataset
uber_reviews_cleaned.csv # Preprocessed reviews
uber_reviews_sampled.csv # Stratified sample for annotation
uber_reviews_tagged.csv # Annotated reviews (in progress)
notebooks/
datasets_reviews.ipynb # Initial data exploration
preprocessing_uber.ipynb # Preprocessing analysis
uber_cleaned.ipynb # Cleaned data verification
src/
preprocess.py # Text cleaning and filtering pipeline
sampler.py # Stratified sampling strategies
multitag.py # GUI annotation tool
train.py # Model training (in progress)
infer.py # Inference pipeline (in progress)
README.md
.gitignore
data/
uber_reviews.csv # Raw dataset
uber_reviews_cleaned.csv # Preprocessed reviews
uber_reviews_sampled.csv # Stratified sample for annotation
uber_reviews_tagged.csv # Annotated reviews (in progress)
notebooks/
preprocessing_uber.ipynb # Preprocessing analysis
uber_cleaned.ipynb # Cleaned data verification
src/
preprocess.py # Text cleaning and filtering pipeline
sampler.py # Stratified sampling strategies
multitag.py # GUI annotation tool
train.py # Model training (in progress)
infer.py # Inference pipeline (in progress)
outputs/
figures/
```
## Current Progress

View File

@@ -1,8 +1,23 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "f4474e0f",
"metadata": {},
"source": [
"# Preprocessing Requirements\n",
"## RECLASS\n",
"\n",
"**Purpose**: Ensure samples are consistent with the original dataset and find issues with current sampling/preprocessing methods.\n",
"\n",
"**Dataset**: Uber Customer Reviews from Google Play (Kaggle)\n",
"\n",
"---"
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 23,
"id": "470fe7c6-1614-4daf-879f-e6c399117c7b",
"metadata": {},
"outputs": [],
@@ -13,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 24,
"id": "afe1168c",
"metadata": {},
"outputs": [
@@ -34,7 +49,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 25,
"id": "b855045e-2dd1-4fa1-ab5a-8ce8b50b02ee",
"metadata": {},
"outputs": [],
@@ -45,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 26,
"id": "e7da1fb6-ede6-46c6-8fbd-fa491d3351c5",
"metadata": {},
"outputs": [
@@ -200,7 +215,7 @@
"4 4.486.10002 en in "
]
},
"execution_count": 14,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
@@ -211,7 +226,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 27,
"id": "5c02ec54-4583-4720-88c6-1110b52c3f88",
"metadata": {},
"outputs": [
@@ -235,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 28,
"id": "1da5d625-a4ba-49f8-8314-cc9e0f4ef96a",
"metadata": {},
"outputs": [
@@ -262,7 +277,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 29,
"id": "1c97e396-8f05-4df7-bd0a-1bbecf6911b4",
"metadata": {},
"outputs": [],
@@ -272,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 30,
"id": "55324c94-4944-4844-b00e-dc08c8989f7b",
"metadata": {},
"outputs": [
@@ -291,7 +306,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 31,
"id": "c45959fe-3e23-4831-a41a-94c89892247f",
"metadata": {},
"outputs": [
@@ -326,7 +341,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 32,
"id": "bf14e3db-a1b4-4fad-8102-b7ac25feeefa",
"metadata": {},
"outputs": [
@@ -344,7 +359,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 33,
"id": "8ccc07fa-9913-4047-ae17-35d2454eb059",
"metadata": {},
"outputs": [
@@ -357,66 +372,67 @@
"1 STAR REVIEWS:\n",
"==========================================\n",
"\n",
"Driver come very late than you can't do anthing pay and wait. Very bad service you can't cancil your when driver not come. Ubar charge money without service. This is very bad bad bad. So take local au...\n",
"(Length: 47.0 words)\n",
"Many times driver cancelled the ride only because he didn't wanted to go to my destination and I was supposed to pay the cancellation fees without any reason.\n",
"(Length: 28.0 words)\n",
"\n",
"I have uninstalled and reinstalled the app around 5 times over the course of the past 3 days. Every time I try to use the app, I get stuck in and endless reCaptcha loop. (I enter my phone number, solv...\n",
"(Length: 66.0 words)\n",
"Their drivers are always finding new ways to outsmart customers.When Uber started initally, it was a pleasure to use their services.Now either when you book it says a few minutes n the moment you conf...\n",
"(Length: 98.0 words)\n",
"\n",
"Thieves. Sent an Uber to my house in the middle of the night and wouldn't refund.\n",
"(Length: 16.0 words)\n",
"terrible GPS system. takes you the long way everywhere. seriously, Waze, google maps and pretty much every other GPS shows faster routes. please fix this.\n",
"(Length: 25.0 words)\n",
"\n",
"==========================================\n",
"2 STAR REVIEWS:\n",
"==========================================\n",
"\n",
"Your app is required to much space\n",
"(Length: 7.0 words)\n",
"no helpline number, customer is unable to contect in case of emegrncy\n",
"(Length: 12.0 words)\n",
"\n",
"I'm very disappointed. At first,I used Uber because it was far better than regular taxi. But I stopped using it because the application is very heavy and the drivers rarely reached my pinned locatio...\n",
"(Length: 107.0 words)\n",
"Ghaantaa tum threk nhi kr skte u r just lying\n",
"(Length: 10.0 words)\n",
"\n",
"nowhere to leave a tip!\n",
"(Length: 5.0 words)\n",
"Nice application 😘😘\n",
"(Length: 3.0 words)\n",
"\n",
"==========================================\n",
"3 STAR REVIEWS:\n",
"==========================================\n",
"\n",
"اوبر المدينة احيانا كويس .. بس لما يكون السائق باخر ملك ربي و تنتظر 14 دقيقه و بعدين يلغي و تصير دخلت بوقت الذروة المفروض يكون في تعويض .. زي لما تلغي انت .\n",
"(Length: 34.0 words)\n",
"The app is good but I got charged for a cancelation because the driver was going to make me walk a block to go to him... what's the point in the app if I have to go to them\n",
"(Length: 39.0 words)\n",
"\n",
"Good application\n",
"(Length: 2.0 words)\n",
"Final amount to pay in cash doesn't always appear correct on app. You can't challenge the cost or question it. Example toll. They over charged by 60% of original cost and won't review it properly. Whe...\n",
"(Length: 59.0 words)\n",
"\n",
"Toooslooow\n",
"(Length: 1.0 words)\n",
"Location of the driver's car is not updated properly . I'm using android, and the location is keep being update all the time . Please fix this problem .\n",
"(Length: 29.0 words)\n",
"\n",
"==========================================\n",
"4 STAR REVIEWS:\n",
"==========================================\n",
"\n",
"Help full\n",
"(Length: 2.0 words)\n",
"Good\n",
"(Length: 1.0 words)\n",
"\n",
"Won't allow me to change my payment details. Update: Problem solved.\n",
"(Length: 11.0 words)\n",
"I like that app 😍🙃\n",
"(Length: 5.0 words)\n",
"\n",
"Very good\n",
"(Length: 2.0 words)\n",
"it is very difficult to contact the chief operator if there is any \n",
"problem...we are not clear as to whom to contact if problem with uber driver\n",
"(Length: 27.0 words)\n",
"\n",
"==========================================\n",
"5 STAR REVIEWS:\n",
"==========================================\n",
"\n",
"Good driving skills\n",
"(Length: 3.0 words)\n",
"I had a great uber experience at kolkata good experience.\n",
"(Length: 10.0 words)\n",
"\n",
"Lovery\n",
"Nice\n",
"(Length: 1.0 words)\n",
"\n",
"Excellent experience\n",
"(Length: 2.0 words)\n"
"It's an awesome aap\n",
"(Length: 4.0 words)\n"
]
}
],

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,24 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "6318e936",
"metadata": {},
"source": [
"# Preprocessing Requirements\n",
"## RECLASS\n",
"\n",
"**Purpose**: Verify the output datasets.\n",
"\n",
"- `uber_reviews_cleaned.csv` - Full cleaned dataset\n",
"- `uber_reviews_sampled.csv` - tbc\n",
"- `uber_reviews_tagged.csv` - tbc ...Annotation progress\n",
"\n",
"**Dataset**: Uber Customer Reviews from Google Play (Kaggle)\n",
"\n",
"---"
]
},
{
"cell_type": "code",
"execution_count": 1,

View File

@@ -2,6 +2,8 @@
# This app enables manual annotation of reviews in the Uber dataset, for training with
# to achieve review classifications with multi task deep learning
# In another time I would have had much more tasks / classifications so mtl can perform better (that would mean better labelling),
#at least that is my prediction of why this may not be as good as I wanted
import tkinter as tk
from tkinter import ttk
import pandas as pd
@@ -47,8 +49,8 @@ class MultiTag:
self.color_complete = "#00AA00"
# Paths
tagged_path = "multitag/data/uber_reviews_tagged.csv"
sampled_path = "multitag/data/uber_reviews_sampled.csv"
tagged_path = "data/uber_reviews_tagged.csv"
sampled_path = "data/uber_reviews_sampled.csv"
# self.load_review_data("data/uber_reviews_sampled.csv")
# self.load_review_data("data/uber_reviews_tagged.csv")
if not os.path.exists(tagged_path):
@@ -256,7 +258,7 @@ class MultiTag:
def submit_tag(self):
self.review_data.at[self.current_review_index, "tagged"] = 1
self.save_tags("multitag/data/uber_reviews_tagged.csv")
self.save_tags("data/uber_reviews_tagged.csv")
self.display_next_review()
def try_submit(self, event):
@@ -291,9 +293,9 @@ class MultiTag:
print(f"SESSION COMPLETE")
print(f"{'='*50}")
print(f"Total tagged: {tagged_count} / {len(self.review_data)}")
print(f"Saved to: multitag/data/uber_reviews_tagged.csv")
print(f"Saved to: data/uber_reviews_tagged.csv")
print(f"Bye (ʘ‿ʘ)╯")
self.save_tags("multitag/data/uber_reviews_tagged.csv")
self.save_tags("data/uber_reviews_tagged.csv")
self.root.destroy()
def get_current_review_index(self):