Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Automated Content Tagging & Knowledge Graph Builder

Responsible: Mario von Bassen Start Date: 2022-09-01 Last Change: TBD Status: In Progress


Table of Contents

  1. Introduction & Use Case

  2. General

    1. Project Scope
    2. Background of the Project
    3. Problem Definition
    4. Solution Approaches
    5. Interfaces and Frameworks
    6. IDEs and Programs
  3. Functional Requirements

  4. Non-Functional Requirements

    1. General Requirements
    2. Legal Requirements
    3. Technical Requirements
  5. General Conditions

    1. Timetable
    2. Technical Requirements
    3. Risk Analyses
    4. Quality and Testing
  6. Data Situation

  7. Definition of Done

  8. Attachments

  9. System Overview

    1. Frontend Overview
    2. Backend Overview
    3. Database
    4. Data Pipeline
  10. Model

    1. OCR & Title Extraction
    2. Data Preprocessing
    3. Title vs Description Classification
    4. Deep Learning & Logistic Regression Trainings
    5. Binary Classification Summary
    6. Undersampled & Oversampled Data
    7. Multiclass Classification
    8. Algorithm Complexity & Category Classification
    9. Important Papers

Introduction & Use Case

As a first step, the application should independently identify or classify products (possibly also reviews) of a webshop as products and differentiate them from other content elements with the help of an AI model. A web application provides the user interface for uploading content. Next, the application assigns Schema.org meta-tags (Product, Offer, Review) and expands them with meta descriptions. Finally, it constructs a knowledge graph of the webshop’s assortment for analytics and SEO benefits.


General

Project Scope

Develop an app where users upload webshop content. The system filters input, extracts data, uses ML to:

  • Identify products vs. non-products
  • Classify product category, features, and values
  • Output Schema.org meta-tags and build a knowledge graph of the assortment

Background of the Project

Search engines need structured data (Schema.org) to understand webpages. This tool simplifies adding structured data for e-commerce hosts to build semantic sites.

Problem Definition

  • Search engines can’t parse page semantics
  • Structured data insertion is hard for non-technical hosts
  • Complex entity relationships are hidden
  • Large assortments become unmanageable
  • Out-of-scope products go unnoticed; recommendations fail
  • Verifying entity accuracy and completeness is difficult

Solution Approaches

  • Use Schema.org structured data for ML semantic understanding
  • User-friendly upload & tagging interface
  • Automated knowledge graph visualization
  • Graphical product display options
  • Recommender systems & anomaly detection leverage structured data
  • Structured data improves SEO rich snippets
  • Entity-level data enables quick fact verification

Interfaces and Frameworks

Interfaces:

  • Frontend ↔ Backend (REST)
  • Backend ↔ Database (SQLite/MySQL)
  • Backend ↔ ML Model
  • Model ↔ Database

Frameworks:

  • Python (Flask or Django), R for ML
  • Frontend: HTML, CSS, JS (Bootstrap/jQuery/React optional)
  • ML: NumPy, pandas, scikit-learn, TensorFlow, Keras
  • Visualization: Matplotlib, graph libs

IDEs and Programs

  • Frontend: VS Code
  • Backend: PyCharm
  • Model: Anaconda, Jupyter, PyCharm, Google Colab

Functional Requirements

Basic Features:

  • User registration, login/logout
  • Account management (edit/delete)
  • Upload code, images, HTML/text
  • Save user data and settings
  • Download/copy model output

Extended Features:

  • Social media sharing
  • Reviews & voting
  • Google Mail integration
  • Activity tracking
  • Notifications & updates
  • Account status dashboard

Non-Functional Requirements

General Requirements

  • Loading Time: ≥ 90 on Google Lighthouse
  • Usability: Follow Nielsen’s 10 heuristics; usability testing
  • Responsive Design: Desktop-first; support mobile/tablet

Legal Requirements

  • GDPR/Data Protection Act compliance
  • Cookie consent (Google Analytics)

Technical Requirements

  • Cross-browser: Chrome, Safari, Edge, Firefox, Opera

General Conditions

Timetable

  • Duration: 2022-09-01 to 2023-01-31
  • Effort: ≥ 40 hours/week

Technical Requirements

  • Access to Google Colab & Jupyter Notebook
  • Hardware: laptop for mobile work; tower PC for model training

Risk Analyses

See risk table in attachments.

Quality and Testing

  • Define QA process; use test plans, review cycles

Data Situation

Combined public datasets for product/review classification. After cleaning, obtained:

  • 13,172,462 products (as of 2022-09-28) with title, category, brand, description
  • Datasets for binary (title vs. description) and multiclass classification

Definition of Done

Specifies deliverables, pricing, timelines, acceptance criteria, and stakeholder responsibilities. Project completes when all functional/non-functional requirements pass QA and stakeholder sign-off.


Attachments

  • Detailed specs, diagrams, risk tables, dataset summaries

System Overview

Frontend Overview

Functional Requirements:

  • Account CRUD
  • Login/registration UI
  • Upload & result pages
  • Settings page

Design: Figures 3–7 (login, upload, result, account settings)

Backend Overview

Written in Flask (lightweight vs. Django). Uses SQLite (migrate to MySQL later). Supports user and upload data management.

Database

Entity-Relationship Diagrams (first draft)

Data Pipeline

  1. Upload: URL scrape / manual text/HTML / image upload
  2. Storage: raw data for display & model training
  3. Processing: text cleaning, OCR, extraction, classification
  4. Output: display on site or save for model

Model

OCR & Title Extraction

Sample Python code for OCR and title detection

Data Preprocessing

  • Select columns: title, category, brand, description
  • Remove special chars, numeric-only rows, HTML tags
  • Expand contractions, deduplicate
  • Filter by length (title < 30 words, description < 300 words)
  • Lowercase, remove stopwords, lemmatize

Title vs Description Classification

  • Binary classification: Title (1) vs. Description (0)
  • Under-/oversampling due to class imbalance
  • TF‑IDF vs. CountVectorizer; unigram/bigram tests

Deep Learning & Logistic Regression Trainings

  • Multiple training runs (1–11) varying vectorizer, max_features, n-grams, solver
  • Report precision, recall, F1-score, accuracy

Binary Classification Summary

Run Solver Vectorizer Features n‑gram Score
1 liblinear CV 1500 uni 92%
11 liblinear TF‑IDF (min_df=5) 3500 uni 95%

Undersampled & Oversampled Data

  • Undersampled logistic regression runs (mf_df 1–20); scores ~94.5%
  • Oversampling doubles training time with similar scores

Multiclass Classification

  • Four classes: Title, Brand, Category, Description
  • Initial imbalance; apply sampling techniques
  • Logistic Regression & other algorithms; scores ~80–94%

Algorithm Complexity & Category Classification

  • KNN: brute-force O(knd), KD-tree O(n d log n)
  • Category classification uses extracted Title, Brand, Description as inputs

Important Papers

  • Semantic Web for E‑Commerce, arXiv:2109.01084
  • Title Classification Techniques, NTU CSIE

About

A huge project to scan e-commerce websites with OCR and translate the scaned data into JSON-LD and so on...

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages