← Browse all
C3PA Sentence-Level Candidate Parser — Parse C3PA privacy-policy annotations into aligned sentence-level ML dataset candidates.

C3PA Sentence-Level Candidate Parser

Language Tools Updated 4w ago

Parse C3PA privacy-policy annotations into aligned sentence-level ML dataset candidates.

About

A Python parser for turning the C3PA Dataset (California Consumer Privacy Act annotations on privacy policies) into structured sentence-level dataset candidates for ML/AI training and evaluation. It extracts readable policy text from the original HTML documents, segments it into full grammatical sentences with spaCy, and aligns C3PA annotation evidence back to those reconstructed sentences using a three-tier algorithm (sub-sentence fragments, multi-sentence paragraph spans, and partial token-overlap matches). Annotation labels are preserved verbatim. Outputs are split into single-label, high-confidence single-label, multi-label, and unannotated sentence CSVs, plus unmatched and ambiguous annotation files, for use in sentence classification, policy auditing, retrieval, and negative sampling.

Summary

A Python parser that extracts grammatical sentences from C3PA privacy-policy HTML and aligns the dataset's verbatim annotations back to those sentences, producing ready-to-use sentence-level ML dataset candidates.

Tech

  • Python
  • spaCy
  • BeautifulSoup4
  • Bash
  • CSV

Tags

  • annotation
  • ccpa
  • dataset
  • nlp
  • privacy-policy
  • sentence-segmentation