ziaddddd commited on
Commit
ae2caab
·
1 Parent(s): d5b6d1b

init dataset

Browse files
Files changed (3) hide show
  1. CONTRIBUTING.md +36 -0
  2. README.md +119 -1
  3. data_nli.jsonl +0 -0
CONTRIBUTING.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to Arabic Dataset
2
+
3
+ ## How to contribute
4
+
5
+ 1. Clone the dataset:
6
+ git clone https://huggingface.co/datasets/YOUR_USERNAME/YOUR_DATASET
7
+
8
+ 2. Add new examples to:
9
+ data/train.jsonl
10
+
11
+ 3. Follow this format:
12
+ {"sentence_a": "...", "sentence_b": "...", "score": 0.9, "relation": "paraphrase"}
13
+
14
+ 4. Commit and push changes
15
+
16
+ ---
17
+
18
+ ## Rules
19
+
20
+ - Arabic language only
21
+ - No duplicate sentences
22
+ - Score must match relation
23
+ - Avoid weak or meaningless sentences
24
+
25
+ ---
26
+
27
+ ## Relations
28
+
29
+ - paraphrase
30
+ - synonym
31
+ - summary
32
+ - contradiction
33
+ - weak
34
+ - hard_negative
35
+ - entailment
36
+ - passive
README.md CHANGED
@@ -1,3 +1,121 @@
1
  ---
2
- license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: "CC-BY-4.0"
3
+ tags:
4
+ - arabic
5
+ - nli
6
+ - embedding
7
+ - legal
8
+ - semantic-similarity
9
+ - sentence-transformers
10
+ language:
11
+ - Arabic
12
+ dataset_name: "Arabic Legal & Semantic Embedding Dataset"
13
+ pretty_name: "Arabic Legal Embedding & NLI Dataset"
14
+ task_categories:
15
+ - semantic-similarity
16
+ - natural-language-inference
17
+ size_categories:
18
+ - 1K<n<10K
19
  ---
20
+ # Arabic Legal & Semantic Embedding Dataset
21
+
22
+ ## Overview
23
+ This dataset contains Arabic sentences prepared for **semantic similarity**, **embedding training**, and **natural language inference (NLI)**. It is designed for training models that understand legal, administrative, and general-purpose Arabic text.
24
+
25
+ Each example consists of two sentences (`sentence_a` and `sentence_b`) along with:
26
+ - a `score` indicating their semantic similarity (0–1)
27
+ - a `relation` describing their type: `summary`, `synonym`, `paraphrase`, `contradiction`, `weak`, `hard_negative`, `entailment`, `passive`.
28
+
29
+ This dataset is suitable for **training Arabic sentence embeddings**, **legal text analysis**, and **sentence similarity tasks**.
30
+
31
+ ---
32
+
33
+ ## Dataset Structure
34
+ - `sentence_a` (str): First sentence
35
+ - `sentence_b` (str): Second sentence
36
+ - `score` (float): Semantic similarity score between 0 and 1
37
+ - `relation` (str): Type of relation. Possible values:
38
+ - `summary`: one sentence summarizes the other
39
+ - `synonym`: sentences have the same meaning
40
+ - `paraphrase`: rephrased version
41
+ - `contradiction`: sentences contradict each other
42
+ - `weak`: weak semantic similarity
43
+ - `hard_negative`: very different but potentially confusing sentences
44
+ - `entailment`: one sentence logically entails the other
45
+ - `passive`: passive voice version
46
+
47
+ ---
48
+
49
+
50
+
51
+ # Arabic Legal Embedding Dataset (NLI & Semantic Similarity)
52
+
53
+ ## Overview
54
+ The **Arabic Legal Embedding Dataset** is a high-quality dataset designed for **semantic similarity**, **Natural Language Inference (NLI)**, and **sentence embedding tasks** in Arabic. It focuses on **legal, administrative, and general-purpose text**, providing a rich set of sentence pairs annotated with semantic relationships. This dataset enables building **robust AI models** capable of understanding nuanced meanings in Arabic legal and administrative contexts.
55
+
56
+ ## Key Features
57
+ - **Semantic Annotations**: Each sentence pair includes a `relation` indicating its semantic type:
58
+ - `summary` – concise summary of the first sentence
59
+ - `synonym` – paraphrases or semantically equivalent sentences
60
+ - `paraphrase` – sentences reworded differently but retaining the same meaning
61
+ - `contradiction` – sentences with opposing meanings
62
+ - `weak` – loosely related or contextually weak sentences
63
+ - `hard_negative` – sentences appearing similar but semantically unrelated
64
+ - `entailment` – one sentence logically follows from the other
65
+ - `passive` – rephrasing in passive voice
66
+
67
+ - **Similarity Scores**: Each pair is scored between 0 and 1, quantifying semantic similarity.
68
+
69
+ - **Legal & Administrative Focus**: Ideal for training **embeddings, NLI models, or semantic search systems** for Arabic legal documents, contracts, administrative texts, and general-purpose applications.
70
+
71
+ ## Dataset Structure
72
+ | Field | Type | Description |
73
+ |-------|------|-------------|
74
+ | `sentence_a` | str | First sentence |
75
+ | `sentence_b` | str | Second sentence |
76
+ | `score` | float | Semantic similarity score (0–1) |
77
+ | `relation` | str | Type of relation (`summary`, `synonym`, `paraphrase`, `contradiction`, `weak`, `hard_negative`, `entailment`, `passive`) |
78
+
79
+ ## Example Entries
80
+ ```json
81
+ {
82
+ "sentence_a": "يرجى التوجه إلى كاتب الجلسة لوضع توقيعك في السجل الرسمي الذي يثبت حضورك للدفاع اليوم.",
83
+ "sentence_b": "يجب التوقيع على إثبات حضور الجلسة في المحضر الرسمي لضمان الحقوق الإجرائية.",
84
+ "score": 0.93,
85
+ "relation": "summary"
86
+ }
87
+ {
88
+ "sentence_a": "إحنا محتاجين مترجم محلف عشان نترجم المستندات دي.",
89
+ "sentence_b": "إحنا محتاجين خبير فني يترجم الرموز اللي موجودة في كشوف الحسابات.",
90
+ "score": 0.58,
91
+ "relation": "hard_negative"
92
+ }
93
+ {
94
+ "sentence_a": "الجلسة كانت زحمة جداً وما قدرناش نتكلم غير كلمتين.",
95
+ "sentence_b": "شُهد ازدحام شديد في الجلسة ولم يُسمح إلا بحديث مقتضب.",
96
+ "score": 0.85,
97
+ "relation": "passive"
98
+ }
99
+ {
100
+ "sentence_a": "عم نحاول نتواصل مع المندوب بس تلفونه مغلق.",
101
+ "sentence_b": "هناك صعوبة مؤقتة في الوصول لجهة التوصيل المسؤولة.",
102
+ "score": 0.82,
103
+ "relation": "entailment"
104
+ }
105
+ {
106
+ "sentence_a": "عم نحاول نتواصل مع المندوب بس تلفونه مغلق.",
107
+ "sentence_b": "هناك صعوبة مؤقتة في الوصول لجهة التواصل المسؤولة.",
108
+ "score": 0.82,
109
+ "relation": "paraphrase"
110
+ }
111
+
112
+ ## Open Contribution
113
+
114
+ This dataset is open for contributions.
115
+
116
+ You can:
117
+ - Clone the repository
118
+ - Add new examples
119
+ - Submit improvements
120
+
121
+ See CONTRIBUTING.md for details.
data_nli.jsonl ADDED
The diff for this file is too large to render. See raw diff