How ashermustafa7/the_crime_of_the_supreme_court works
This repository is a research toolkit for extracting and analyzing Indian Supreme Court case texts, with a focus on crime-related themes and geographic patterns. Its principal workflow is raw judgment text → parsed case records → clustering and seed-based crime labels → map or aggregate views. Separate scripts offer alternative clustering approaches, compare clustering results, and help expand crime-label seeds. The README is only a title, so the map reflects the file tree and sampled scripts; unsampled subsystem wiring is not assumed.
Main entry points: cluster_kmeans_semantic.py Semantic KMeans · extract_and_parse.py Extract and parse · seed_expansion_helper.py Expand crime seeds · raw_texts Judgment texts
Components 20
Case ingestion
- Judgment texts
raw_texts - Extract and parse
scripts/extract_and_parse.py - Parsed cases
Crime analysis
- Semantic KMeans
scripts/cluster_kmeans_semantic.py - Crime seed map
- Alternative clustering
scripts/cluster_and_topics.py - BERTopic clustering
scripts/cluster_bertopic.py - DBSCAN clustering
scripts/cluster_dbscan.py - GMM clustering
scripts/cluster_gmm.py - LDA topics
scripts/cluster_lda.py - Labeled clusters
Evaluation and refinement
- Compare results
scripts/compare_cluster_results.py - Evaluate clustering
scripts/evaluate_clustering.py - Extended evaluation
scripts/evaluate_clustering_extended.py - Expand crime seeds
scripts/seed_expansion_helper.py
Geographic views
- Case map
scripts/map_cases_dash_sample.py - Location counts
scripts/count_cases_by_location.py - State counts
scripts/count_cases_by_state.py - Year counts
scripts/count_cases_by_year.py
Other components
- Researcher
Connections 21
- Researcher → Extract and parse: runs extraction
- Judgment texts → Extract and parse: reads texts
- Extract and parse → Parsed cases: writes cases
- Researcher → Semantic KMeans: runs analysis
- Parsed cases → Semantic KMeans: reads cases
- Semantic KMeans → Crime seed map: reads seeds
- Semantic KMeans → Labeled clusters: writes labels
- Parsed cases → Alternative clustering: reads cases
- Parsed cases → BERTopic clustering: reads cases
- Parsed cases → DBSCAN clustering: reads cases
- Parsed cases → GMM clustering: reads cases
- Parsed cases → LDA topics: reads cases
- Labeled clusters → Compare results: compares outputs
- Labeled clusters → Evaluate clustering: evaluates labels
- Labeled clusters → Extended evaluation: evaluates labels
- Labeled clusters → Expand crime seeds: reviews clusters
- Expand crime seeds → Crime seed map: updates suggestions
- Labeled clusters → Case map: plots cases
- Labeled clusters → Location counts: groups locations
- Labeled clusters → State counts: counts states
- Labeled clusters → Year counts: counts years