How hamshika06/inkwell works
Inkwell is a privacy-policy clause classifier: users provide policy text, which is segmented and scored against a fixed category schema; results attach labels to source clauses. The implemented demo path supports Stage 1, including category-based FAQs. The README also describes silence detection and retrieval-based Stage 2, but the sampled runtime does not show those implementations. Data preparation, model training, prediction, and evaluation are represented as supporting layers. Edges reflect sampled calls or documented behavior; unsampled capability links are marked unverified.
Main entry points: common.py Shared metrics and data · v1 Frozen dataset · predict.py Model predictor · stage1.py Policy segmenter
Components 20
Data preparation
- OPP-115 preparation
preprocessing/opp115_preprocess.py - C3PA preparation
preprocessing/c3pa_preprocess.py - Dataset integration
data_integration/combine_opp115_c3pa.py - Label schema
configs/label_schema.json - Frozen dataset
data/versions/v1
Model development
- Shared metrics and data
inkwell/common.py - TF-IDF SVM training
scripts/train_baseline.py - Encoder training
scripts/train_encoder.py - Masked training loss
inkwell/loss.py - Saved model runs
runs
Policy analysis
- Model predictor
inkwell/predict.py - Policy segmenter
inkwell/stage1.py - Category FAQs
inkwell/stage1.py - Silence detection
inkwell - Open Q&A retrieval
inkwell - Clause span extraction
inkwell - Local demo
demo/server.py
Evaluation
- Modern evaluation
scripts/evaluate_modern.py - Human review
scripts/modern_review.py
Other components
- Policy user
Connections 25
- OPP-115 preparation → Dataset integration: prepares source data
- C3PA preparation → Dataset integration: prepares source data
- Dataset integration → Frozen dataset: combined dataset
- Label schema → Shared metrics and data: loads categories
inkwell/common.py - Shared metrics and data → Frozen dataset: verifies checksums
inkwell/common.py - Frozen dataset → TF-IDF SVM training: training data
scripts/train_baseline.py - Frozen dataset → Encoder training: training data
scripts/train_encoder.py - Shared metrics and data → TF-IDF SVM training: provides dataset helpers
scripts/train_baseline.py - Shared metrics and data → Encoder training: provides dataset helpers
scripts/train_encoder.py - Encoder training → Masked training loss: computes loss
scripts/train_encoder.py - TF-IDF SVM training → Saved model runs: saves model run
scripts/train_baseline.py - Encoder training → Saved model runs: saves model run
scripts/train_encoder.py - Policy user → Local demo: submits policy
- Local demo → Policy segmenter: analyzes policy
- Policy segmenter → Model predictor: scores segments
inkwell/stage1.py - Model predictor → Shared metrics and data: loads categories
inkwell/predict.py - Saved model runs → Model predictor: loads model artifacts
inkwell/predict.py - Policy segmenter → Category FAQs: organizes categories
inkwell/stage1.py - Policy segmenter → Silence detection: checks uncovered categories
README.md - Policy user → Open Q&A retrieval: asks question
README.md - Open Q&A retrieval → Clause span extraction: returns matching clauses
README.md - Human review → Frozen dataset: selects review rows
scripts/modern_review.py - Human review → Modern evaluation: provides reviewed labels
- Modern evaluation → Model predictor: scores reviewed text
scripts/evaluate_modern.py - Model predictor → Modern evaluation: returns scores
scripts/evaluate_modern.py