# bd-wm-sa-d/web-mining-joblens architecture

> Architecture diagram of the GitHub repository bd-wm-sa-d/web-mining-joblens, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bd-wm-sa-d/web-mining-joblens
- Repository: https://github.com/bd-wm-sa-d/web-mining-joblens

## Overview

JobLens mines public Vietnamese job postings and company reviews from TopCV and ITviec. Its main workflow is crawl and parse source pages, detect duplicate postings, extract and normalize skills, then expose skill extraction and job recommendations through an HTTP service. Separate analysis branches cover review aspect/sentiment scoring and skill co-occurrence graphs; annotation tools and evaluation support these mining tasks. The README documents capabilities whose implementation was not sampled; edges are limited to documented relationships or visible imports, and unsampled internals are represented only at supported paths.

Main entry points: [`service/skills.py`](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/skills.py) (Skill alias catalog), [`batch/skill_extractor.py`](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/batch/skill_extractor.py) (Batch skill extraction), [`service/app.py`](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/app.py) (HTTP endpoints), [`crawler/topcv/spider.py`](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/topcv/spider.py) (TopCV spider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_topcv["TopCV spider<br/>[spider.py]"]
  node_itviec["ITviec spiders"]
  node_topcv_parse["TopCV parsers<br/>[parser.py]"]
  node_itviec_parse["ITviec parsers<br/>[parser.py]"]
  node_privacy["Crawl safeguards<br/>[common.py]"]
end

subgraph group_mining["Text Mining"]
  node_dedup["Job deduplication<br/>[dedup.py]"]
  node_skill_dict["Skill alias catalog<br/>[skills.py]"]
  node_weak_skill["Skill weak labels<br/>[weak_labels.py]"]
  node_phobert["PhoBERT extraction<br/>[phobert.py]"]
  node_batch_skill["Batch skill extraction<br/>[skill_extractor.py]"]
end

subgraph group_analysis["Analysis"]
  node_absa_lex["Aspect and sentiment lexicons<br/>[lexicon.py]"]
  node_absa_score["Review scoring<br/>[score.py]"]
  node_absa_supervised["Supervised review model<br/>[supervised.py]"]
  node_absa_eval["Review evaluation<br/>[eval_dev.py]"]
  node_skill_graph["Skill co-occurrence graph<br/>[build.py]"]
  node_graph_analysis["Graph analysis<br/>[analyze.py]"]
  node_stats["Evaluation statistics<br/>[bootstrap.py]"]
  node_runlog["Experiment records<br/>[runlog.py]"]
end

subgraph group_serving["HTTP Service"]
  node_recommend["Job recommendations<br/>[baseline.py]"]
  node_http["HTTP endpoints<br/>[app.py]"]
  node_index["Service indexing<br/>[index.py]"]
end

subgraph group_annotation["Annotation"]
  node_skill_annotation["Skill annotation tools"]
  node_bio_export["BIO export<br/>[export_bio.py]"]
end

node_job_seeker(("Job seeker"))
node_topcv_site(("TopCV"))
node_itviec_site(("ITviec"))

node_topcv -->|"fetches pages"| node_topcv_site
node_itviec -->|"fetches pages"| node_itviec_site
node_topcv -->|"parses postings"| node_topcv_parse
node_itviec -->|"parses postings and reviews"| node_itviec_parse
node_topcv -.->|"uses safeguards"| node_privacy
node_itviec -.->|"uses safeguards"| node_privacy
node_topcv_parse -.->|"provides postings"| node_dedup
node_itviec_parse -.->|"provides postings"| node_dedup
node_dedup -->|"evaluated with"| node_stats
node_skill_dict -.->|"supports skill annotation"| node_skill_annotation
node_skill_dict -->|"normalizes skills"| node_batch_skill
node_phobert -->|"provides model inference"| node_batch_skill
node_weak_skill -.->|"supplies training labels"| node_phobert
node_batch_skill -->|"serves extraction"| node_http
node_skill_dict -->|"provides skill catalog"| node_recommend
node_http -.->|"handles recommendations"| node_recommend
node_index -->|"builds service index"| node_skill_dict
node_itviec_parse -.->|"provides review text"| node_absa_lex
node_absa_lex -->|"scores aspects and polarity"| node_absa_score
node_absa_lex -->|"provides baseline features"| node_absa_supervised
node_absa_supervised -->|"evaluated on dev"| node_absa_eval
node_batch_skill -.->|"provides skill extraction capability"| node_skill_graph
node_skill_graph -->|"analyzes graph"| node_graph_analysis
node_skill_annotation -->|"exports labeled spans"| node_bio_export
node_absa_score -.->|"records evaluation"| node_runlog
node_absa_eval -.->|"uses bootstrap evaluation"| node_stats
node_job_seeker -->|"requests recommendations or extraction"| node_http
node_http -->|"returns results"| node_job_seeker

click node_topcv "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/topcv/spider.py"
click node_itviec "https://github.com/bd-wm-sa-d/web-mining-joblens/tree/main/crawler/itviec"
click node_topcv_parse "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/topcv/parser.py"
click node_itviec_parse "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/itviec/parser.py"
click node_privacy "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/common.py"
click node_dedup "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/dedup.py"
click node_skill_dict "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/skills.py"
click node_weak_skill "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/ie/weak_labels.py"
click node_phobert "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/ie/phobert.py"
click node_batch_skill "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/batch/skill_extractor.py"
click node_absa_lex "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/lexicon.py"
click node_absa_score "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/score.py"
click node_absa_supervised "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/supervised.py"
click node_absa_eval "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/eval_dev.py"
click node_skill_graph "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/graph/build.py"
click node_graph_analysis "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/graph/analyze.py"
click node_recommend "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/recsys/baseline.py"
click node_http "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/app.py"
click node_index "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/index.py"
click node_skill_annotation "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/annotation/preannotate_dict.py"
click node_bio_export "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/annotation/export_bio.py"
click node_stats "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/experiments/bootstrap.py"
click node_runlog "https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/experiments/runlog.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_topcv,node_itviec,node_topcv_parse,node_itviec_parse,node_privacy toneBlue
class node_dedup,node_skill_dict,node_weak_skill,node_phobert,node_batch_skill toneAmber
class node_absa_lex,node_absa_score,node_absa_supervised,node_absa_eval,node_skill_graph,node_graph_analysis,node_stats,node_runlog toneMint
class node_recommend,node_http,node_index toneRose
class node_skill_annotation,node_bio_export,node_job_seeker,node_topcv_site,node_itviec_site toneIndigo
```

## Components

### Collection

- [TopCV spider](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/topcv/spider.py): `crawler/topcv/spider.py`
- [ITviec spiders](https://github.com/bd-wm-sa-d/web-mining-joblens/tree/main/crawler/itviec): `crawler/itviec`
- [TopCV parsers](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/topcv/parser.py): `crawler/topcv/parser.py`
- [ITviec parsers](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/itviec/parser.py): `crawler/itviec/parser.py`
- [Crawl safeguards](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/common.py): `crawler/common.py`

### Text Mining

- [Job deduplication](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/crawler/dedup.py): `crawler/dedup.py`
- [Skill alias catalog](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/skills.py): `service/skills.py`
- [Skill weak labels](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/ie/weak_labels.py): `ie/weak_labels.py`
- [PhoBERT extraction](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/ie/phobert.py): `ie/phobert.py`
- [Batch skill extraction](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/batch/skill_extractor.py): `batch/skill_extractor.py`

### Analysis

- [Aspect and sentiment lexicons](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/lexicon.py): `absa/lexicon.py`
- [Review scoring](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/score.py): `absa/score.py`
- [Supervised review model](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/supervised.py): `absa/supervised.py`
- [Review evaluation](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/absa/eval_dev.py): `absa/eval_dev.py`
- [Skill co-occurrence graph](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/graph/build.py): `graph/build.py`
- [Graph analysis](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/graph/analyze.py): `graph/analyze.py`
- [Evaluation statistics](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/experiments/bootstrap.py): `experiments/bootstrap.py`
- [Experiment records](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/experiments/runlog.py): `experiments/runlog.py`

### HTTP Service

- [Job recommendations](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/recsys/baseline.py): `recsys/baseline.py`
- [HTTP endpoints](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/app.py): `service/app.py`
- [Service indexing](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/service/index.py): `service/index.py`

### Annotation

- [Skill annotation tools](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/annotation/preannotate_dict.py): `annotation/preannotate_dict.py`
- [BIO export](https://github.com/bd-wm-sa-d/web-mining-joblens/blob/main/annotation/export_bio.py): `annotation/export_bio.py`

### Other components

- **Job seeker**
- **TopCV**
- **ITviec**

## Connections

- TopCV spider → TopCV: fetches pages (evidence: `README.md`)
- ITviec spiders → ITviec: fetches pages (evidence: `README.md`)
- TopCV spider → TopCV parsers: parses postings (evidence: `README.md`)
- ITviec spiders → ITviec parsers: parses postings and reviews (evidence: `README.md`)
- TopCV spider → Crawl safeguards: uses safeguards
- ITviec spiders → Crawl safeguards: uses safeguards (evidence: `crawler/itviec/parser.py`)
- TopCV parsers → Job deduplication: provides postings
- ITviec parsers → Job deduplication: provides postings
- Job deduplication → Evaluation statistics: evaluated with (evidence: `crawler/eval_dedup.py`)
- Skill alias catalog → Skill annotation tools: supports skill annotation (evidence: `service/skills.py`)
- Skill alias catalog → Batch skill extraction: normalizes skills (evidence: `batch/skill_extractor.py`)
- PhoBERT extraction → Batch skill extraction: provides model inference (evidence: `batch/skill_extractor.py`)
- Skill weak labels → PhoBERT extraction: supplies training labels
- Batch skill extraction → HTTP endpoints: serves extraction (evidence: `service/app.py`)
- Skill alias catalog → Job recommendations: provides skill catalog (evidence: `recsys/baseline.py`)
- HTTP endpoints → Job recommendations: handles recommendations
- Service indexing → Skill alias catalog: builds service index (evidence: `service/index.py`)
- ITviec parsers → Aspect and sentiment lexicons: provides review text
- Aspect and sentiment lexicons → Review scoring: scores aspects and polarity (evidence: `absa/score.py`)
- Aspect and sentiment lexicons → Supervised review model: provides baseline features (evidence: `absa/supervised.py`)
- Supervised review model → Review evaluation: evaluated on dev (evidence: `absa/supervised.py`)
- Batch skill extraction → Skill co-occurrence graph: provides skill extraction capability
- Skill co-occurrence graph → Graph analysis: analyzes graph (evidence: `graph/analyze.py`)
- Skill annotation tools → BIO export: exports labeled spans (evidence: `annotation/export_bio.py`)
- Review scoring → Experiment records: records evaluation
- Review evaluation → Evaluation statistics: uses bootstrap evaluation
- Job seeker → HTTP endpoints: requests recommendations or extraction (evidence: `README.md`)
- HTTP endpoints → Job seeker: returns results (evidence: `README.md`)
