# sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann architecture

> Architecture diagram of the GitHub repository sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann
- Repository: https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann

## Overview

##### Main Components
- Data Sources: Begin with the raw dataset files (TSV files) and the resulting CSV files produced for both preprocessed and non-preprocessed data. These represent your input data.
- Data Preprocessing Module: Represent the “Dataset preprocessing.ipynb” notebook. This is responsible for extracting and transforming raw TSV data into usable CSV data.
- Model Training & Evaluation Module:
- ANN Component: Focus on the “ANN_with_4_hidden_layer.ipynb” as the core ANN architecture that achieved the highest accuracy.
- Comparison Classifiers Module: Include a module symbolizing “Comparison classifiers.ipynb”, where several other standard classifiers (LR, NB, SVM, etc.) are trained and evaluated.
- mBERT Module: Represent the experiments with mBERT through its two separate notebook versions (non-preprocessed and preprocessed) to highlight its performance.
- Results & Evaluation: A final evaluation block, where accuracy metrics and performance comparisons are gathered (this is implicit in the repository documentation and the notebooks).

##### Relationships and Data Flow
- One going directly to the ANN Model component (to show the use of both preprocessed and non-preprocessed data).
- Another leading to the module where alternative classifiers are trained and benchmarked.
- Additionally, include a branch to the mBERT module as it handles the data in its own way.
- Both the ANN and the comparison classifiers (including mBERT) feed into an Evaluation component that aggregates performance metrics.

##### Architectural Patterns and Design Principles
- Pipeline/Modular Architecture: Emphasize the separation of concerns by clearly isolating each stage (data ingestion, preprocessing, model training, evaluation).
- Repeatable and Extensible: The structure should allow adding more classifiers or preprocessing steps in the future, so indicate how modules could be extended.

##### Relevant Technologies and Frameworks
- Jupyter Notebooks are used as the development environment.
- CSV/TSV file handling illustrates the data ingestion technology.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources Subgraph
    subgraph "Data Sources"
        DS1["eng_tam_3_test.tsv"]
        DS2["eng_tam_3_train.tsv"]
        DS3["eng_tam_test_nonprepro_nonaug1.csv"]
        DS4["eng_tam_test_prepro_nonaug1.csv"]
        DS5["eng_tam_train_nonprepro_nonaug1.csv"]
        DS6["eng_tam_train_prepro_nonaug1.csv"]
    end

    %% Data Preprocessing Module
    DP["Dataset preprocessing.ipynb"]

    %% Model Training & Evaluation Modules
    ANN["ANN (4 Hidden Layers)"]
    COMP["Other Classifiers"]
    subgraph "mBERT Experiments"
        mBERT_NP["mBERT non-preprocessed"]
        mBERT_P["mBERT preprocessed"]
    end

    %% Evaluation and Comparison
    EV{"Evaluation & Comparison"}

    %% Data Flow Connections from each Data Source to Data Preprocessing
    DS1 --> DP
    DS2 --> DP
    DS3 --> DP
    DS4 --> DP
    DS5 --> DP
    DS6 --> DP

    %% Data Flow from Data Preprocessing to Model Training Modules
    DP --> ANN
    DP --> COMP
    DP --> mBERT_NP
    DP --> mBERT_P

    %% Data Flow from Model Training Modules to Evaluation
    ANN --> EV
    COMP --> EV
    mBERT_NP --> EV
    mBERT_P --> EV

    %% Click Events for Component Mapping
    click DS1 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_3_test.tsv"
    click DS2 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_3_train.tsv"
    click DS3 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_test_nonprepro_nonaug1.csv"
    click DS4 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_test_prepro_nonaug1.csv"
    click DS5 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_train_nonprepro_nonaug1.csv"
    click DS6 "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/eng_tam_train_prepro_nonaug1.csv"
    click DP "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/Dataset preprocessing.ipynb"
    click ANN "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/ANN_with_4_hidden_layer.ipynb"
    click COMP "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/Comparison clasifiers.ipynb"
    click mBERT_NP "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/mbert_eng_tamil non_prepro.ipynb"
    click mBERT_P "https://github.com/sriramanganesan/offensive-comments-detection-for-tamil-english-in-social-media-using-ann/blob/main/mbert_eng_tamil prepro.ipynb"

    %% Styles and Classes
    classDef data fill:#FFCCCC,stroke:#990000,stroke-width:2px;
    classDef process fill:#CCFFCC,stroke:#009900,stroke-width:2px;
    classDef model fill:#CCCCFF,stroke:#000099,stroke-width:2px;
    classDef evaluation fill:#FFFFCC,stroke:#999900,stroke-width:2px;

    class DS1,DS2,DS3,DS4,DS5,DS6 data;
    class DP process;
    class ANN,COMP,mBERT_NP,mBERT_P model;
    class EV evaluation;
```
