---
# System prepended metadata

title: google opinion C4

---

# google opinion C4

```mermaid
C4Context
    title System Context diagram for Google Opinion Analysis System
    
    System(crawler, "Crawlers", "Scrapes posts and replies from forums")
    SystemDb(db, "Crawler database", "Stores the raw scrapied data")
    System(model, "Opinion Mining System", "Do the mining things")
    SystemDb(fdb, "Frontend database", "Stores analysis tables and charts")
    System(front, "Frontend", "Display the analysis result")
    
    Rel(crawler, db, "save scraped data")
    Rel(db, model, "query")
    Rel(model, fdb, "analyize and format")
    Rel(fdb, front, "access chart data")
    
    UpdateElementStyle(crawler, $fontColor="white", $bgColor="orange")
    UpdateElementStyle(db, $fontColor="white", $bgColor="dark")
    UpdateElementStyle(fdb, $fontColor="white", $bgColor="dark")
    UpdateElementStyle(front, $fontColor="white", $bgColor="green")
    
    UpdateLayoutConfig($c4ShapeInRow="1")
```

```mermaid
C4Container
    title Opinion Mining Container diagram for Google Opinion Analysis System
    
    System_Ext(db, "Crawler database")
    Container_Boundary(b, "Opinion Mining Container") {
        Container_Boundary(b1, "Data Formatter") {
            Container(prep, "Preprocessor")
            Container(dataset, "Dataset")
        }

        Container_Boundary(b2, "Aspects Extractor") {
            Container(ae_dl, "AE Dataloader")
            Container(ae_m, "AE Model")
        }
        
        Container_Boundary(b3, "Aspect-Level Sentiment Classifier") {
            Container(alsc_dl, "ALSC Dataloader")
            Container(alsc_m, "ALSC Model")
        }
    }
    System_Ext(fdb, "Frontend database")
    
    Rel(db, prep, "")
    Rel(prep, dataset, "")
    Rel(dataset, ae_dl, "")
    Rel(ae_dl, ae_m, "")
    Rel(ae_m, alsc_dl, "")
    Rel(alsc_dl, alsc_m, "")
    Rel(alsc_m, fdb, "")
    
    UpdateLayoutConfig($c4ShapeInRow="3")
```


```mermaid
C4Component
    title Preprocessor Component diagram for Google Opinion Analysis System
    
    System_Ext(db, "Crawler Database")
    Container_Boundary(pre, "Perprocessor Commponent") {
        Component(blank, "BlankUnit", "blank somthing")
        Component(clean, "CleanUnit", "clean somthing")
        Component(format, "FormatUnit", "format somthing")
        Component(more, "MoreUnits", "do more things")
        Component(marshal, "JsonMarshalUnit", "Marshal the output")
    }
    System_Ext(ds, "Dataset Component")
    
    Rel(db, blank, "")
    Rel(blank, clean, "")
    Rel(clean, format, "")
    Rel(format, more, "")
    Rel(more, marshal, "")
    Rel(marshal, ds, "")

    UpdateLayoutConfig($c4ShapeInRow="3")
```


:::info
# TODO
- [x] System Context diagram (C1)
	- [ ] Crawler Container diagram (C2)
    ...
	- [x] Opinion Mining Container diagram (C2)
	    - [x] Preproessor Component diagram (C3)
	        - [ ] BlankUnit Code diagram (C4)
	        - [ ] CleanUnit Code diagram (C4)
	        - [ ] FormatUnit Code diagram (C4)
	        - [ ] JsonMarshalUnit Code diagram (C4)
            ...
	    - [ ] Dataset Component diagram (C3)
        ...
	    - [ ] Aspect Extractor Component diagram (C3)
        ...
	    - [ ] Aspect-Level Sentiment Classifier Component diagram (C3)
        ...
	- [ ] Frontend Container diagram (C2)
    ...

