--- language: - "en" pretty_name: "OWI-IT4I Legal Dataset (Annotated with CF-TFIDF and 20News Labels)" tags: - legal - tfidf - 20newsgroups - text-classification - cf-weighting - openwebindex - weak-supervision - legal-tech - probabilistic-labeling license: "mit" task_categories: - text-classification --- # **🧾 OWI-IT4I Legal Dataset (Annotated with TFIDF-CF and 20News Labels)** This dataset contains legal and technical documents derived from the [Open Web Index (OWI)](https://openwebindex.eu/), automatically annotated using a probabilistic CF-TFIDF model trained on the 20 Newsgroups corpus. It is intended for use in legal-tech research, weak supervision tasks, and domain adaptation studies involving text classification or semantic modeling. --- ## **📁 Dataset Structure** - **Format**: CSV - **Main Column**: - text: Raw text of the legal or technical document. - consensus If all 3 methods agree on class which means assigned label - **Other Columns**: Column Description - predicted_class_hard Final class using hard assignment CF - confidence_hard Confidence score for that prediction - initial_class Original class predicted before CF - initial_confidence Original model confidence before CF - predicted_class_prob Final class from probabilistic CF - confidence_prob Confidence from probabilistic CF - predicted_class_maxcf Final class from max CF weighting - confidence_maxcf Confidence from max CF - high_confidence Whether any method had confidence > 0.8 - avg_confidence Average of the 3 confidence scores - **Label Descriptions** Consensus Label 20 Newsgroups Label - 0 alt.atheism - 1 comp.graphics - 2 comp.os.ms-windows.misc - 3 comp.sys.ibm.pc.hardware - 4 comp.sys.mac.hardware - 5 comp.windows.x - 6 misc.forsale - 7 rec.autos - 8 rec.motorcycles - 9 rec.sport.baseball - 10 rec.sport.hockey - 11 sci.crypt - 12 sci.electronics - 13 sci.med - 14 sci.space - 15 soc.religion.christian - 16 talk.politics.guns - 17 talk.politics.mideast - 18 talk.politics.misc - 19 talk.religion.misc --- # **🧠 Annotation Methodology** The annotations were generated using a custom hybrid model that combines **TF-IDF vectorization** with **class-specific feature (CF) weights** derived from the 20 Newsgroups dataset. The selected method, **probabilistic CF weighting**, adjusts TF-IDF scores by class probabilities, producing a context-aware and semantically rich feature representation. The final labels were selected based on highest-confidence predictions across multiple strategies. This approach allows scalable and interpretable weak supervision for large unlabeled corpora. Here’s how the dataset is annotated based on the code you provided and the chunk-based script: --- 🧾 1. Explanation: How the Dataset is Annotated The annotation pipeline uses a custom prediction system built which enhances a logistic regression (LR) classifier with Concept Frequency (CF) weighting. The process includes predictions using three different CF-based methods and annotates each text document with rich prediction metadata. 📚 2. TF-IDF Vectorization + CF Weighting Each document in a chunk is transformed into a TF-IDF vector. Then, CF weights—term importance scores per class—are applied in three different ways: a. Hard Assignment (predicted_class) • Predict the class of each document. • Use the predicted class to apply CF weights to each term. • Re-classify the document with the new weighted TF-IDF. b. Probabilistic Weighting (probabilistic) • Predict class probabilities for each document. • Apply a weighted average of CF values across classes (based on probabilities). • Re-classify with this probabilistically weighted input. c. Max CF (max_cf) • For each term, apply the maximum CF it has across all classes. • Use this to reweight the TF-IDF vector and re-classify. --- 🔍 3. Predicting and Analyzing Each Document Each document is passed through all 3 prediction methods. The result includes: • Final predicted class and confidence for each method. • Initial class prediction (before CF weighting). • Whether the methods agree (consensus). • Whether any method is confident above a threshold (default: 0.8). • Average confidence across methods. --- # **📊 Source & Motivation** The raw documents are sourced from the **OWI crawl**, with a focus on texts from legal and IT domains. The 20 Newsgroups label schema was adopted because of its broad topical coverage and relevance to both general and technical content. Many OWI entries naturally align with categories such as comp.sys.ibm.pc.hardware, misc.legal, and talk.politics.mideast, enabling effective domain transfer and reuse of pretrained class-specific weights. --- # **✅ Use Cases** - Legal-tech classification - Domain-adaptive learning - Zero-shot and weakly supervised labeling - CF-TFIDF and interpretability research - Legal document triage and thematic clustering --- # **📜 Citation** If you use this dataset in your research, please cite the corresponding work (placeholder below): ``` @misc{owi_tfidfcf_2025, title={OWI-IT4I Legal Dataset Annotated with CF-TFIDF}, author={Nurullah Gümüş}, year={2025}, note={Annotated using a probabilistic TF-IDF+CF method trained on 20 Newsgroups.}, url={https://huggingface.co/datasets/your-username/owi-legal-cf-tfidf} } ``` --- # **🛠️ License** MIT