Added usage code to filter for licenses
Browse filesSigned-off-by: Andreas Florath <[email protected]>
README.md
CHANGED
@@ -175,7 +175,7 @@ theorem proving.
|
|
175 |
* Tables: Three distinct tables: facts (definitions or notations),
|
176 |
propositions (theorems and lemmas alongside proofs), and
|
177 |
licensing/repository information.
|
178 |
-
* Entries: 103,
|
179 |
* Size: Character length ranging from as short as 11 to as long as
|
180 |
177,585 characters.
|
181 |
* Source and Collection Method: The Coq source files were collected
|
@@ -204,6 +204,31 @@ includes training or fine-tuning models to focus on proofs rather than
|
|
204 |
definitions and notations. The dataset also allows for filtering based
|
205 |
on specific licenses using the `info.parquet` file.
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
## Experiments and Findings
|
208 |
|
209 |
Initial experiments with the dataset have demonstrated its potential
|
|
|
175 |
* Tables: Three distinct tables: facts (definitions or notations),
|
176 |
propositions (theorems and lemmas alongside proofs), and
|
177 |
licensing/repository information.
|
178 |
+
* Entries: 103,446 facts and 166,035 propositions with proofs.
|
179 |
* Size: Character length ranging from as short as 11 to as long as
|
180 |
177,585 characters.
|
181 |
* Source and Collection Method: The Coq source files were collected
|
|
|
204 |
definitions and notations. The dataset also allows for filtering based
|
205 |
on specific licenses using the `info.parquet` file.
|
206 |
|
207 |
+
```python
|
208 |
+
import pandas as pd
|
209 |
+
|
210 |
+
df_facts_raw = pd.read_parquet("facts.parquet")
|
211 |
+
df_info = pd.read_parquet("info.parquet")
|
212 |
+
|
213 |
+
# This is the list of licenses which might be seen as permissive
|
214 |
+
permissive_licenses_list = [
|
215 |
+
'Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause',
|
216 |
+
'CECILL-B', 'CECILL-C',
|
217 |
+
'LGPL-2.1-only', 'LGPL-2.1-or-later', 'LGPL-3.0-only', 'LGPL-3.0-or-later',
|
218 |
+
'MIT', 'MPL-2.0', 'UniMath' ]
|
219 |
+
|
220 |
+
# Set the license-type to permissive based on the list
|
221 |
+
df_info['license-type'] = df_info['spdx-id'].apply(
|
222 |
+
lambda x: 'permissive' if x in permissive_licenses_list else 'not permissive')
|
223 |
+
|
224 |
+
# Merge df_facts with df_info to get the license-type information
|
225 |
+
# 'symbolic_name' is the common key in both DataFrames
|
226 |
+
df_facts_merged = pd.merge(df_facts_raw, df_info, on='symbolic_name', how='left')
|
227 |
+
|
228 |
+
# Filter the merged DataFrame to only include entries with a permissive license
|
229 |
+
df_facts = df_facts_merged[df_facts_merged['license-type'] == 'permissive']
|
230 |
+
```
|
231 |
+
|
232 |
## Experiments and Findings
|
233 |
|
234 |
Initial experiments with the dataset have demonstrated its potential
|