Commit
·
c394758
1
Parent(s):
0fe892e
update README example
Browse files
README.md
CHANGED
|
@@ -141,40 +141,21 @@ Contains enhanced citations with full paper metadata and content:
|
|
| 141 |
from datasets import load_dataset
|
| 142 |
|
| 143 |
# Load papers dataset
|
| 144 |
-
papers = load_dataset("deepscholar-bench/DeepScholarBench", name="papers"
|
| 145 |
print(f"Loaded {len(papers)} papers")
|
| 146 |
|
| 147 |
# Load citations dataset
|
| 148 |
-
citations = load_dataset("deepscholar-bench/DeepScholarBench", name="citations"
|
| 149 |
print(f"Loaded {len(citations)} citations")
|
| 150 |
|
| 151 |
# Load important citations with enhanced metadata
|
| 152 |
-
important_citations = load_dataset("deepscholar-bench/DeepScholarBench", name="important_citations"
|
| 153 |
print(f"Loaded {len(important_citations)} important citations")
|
| 154 |
|
| 155 |
# Convert to pandas for analysis
|
| 156 |
papers_df = papers.to_pandas()
|
| 157 |
citations_df = citations.to_pandas()
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
**Note**: This dataset uses a custom loading script, so you need to include `trust_remote_code=True` when loading.
|
| 161 |
-
|
| 162 |
-
### Alternative: Direct CSV Loading
|
| 163 |
-
|
| 164 |
-
```python
|
| 165 |
-
import pandas as pd
|
| 166 |
-
|
| 167 |
-
# Load papers dataset
|
| 168 |
-
papers_df = pd.read_csv('papers_with_related_works.csv')
|
| 169 |
-
print(f"Loaded {len(papers_df)} papers")
|
| 170 |
-
|
| 171 |
-
# Load citations dataset
|
| 172 |
-
citations_df = pd.read_csv('recovered_citations.csv')
|
| 173 |
-
print(f"Loaded {len(citations_df)} citations")
|
| 174 |
-
|
| 175 |
-
# Load important citations
|
| 176 |
-
important_citations_df = pd.read_csv('important_citations.csv')
|
| 177 |
-
print(f"Loaded {len(important_citations_df)} important citations")
|
| 178 |
```
|
| 179 |
|
| 180 |
### Example: Extract Related Works for a Paper
|
|
@@ -194,7 +175,7 @@ print(f"Number of citations: {len(paper_citations)}")
|
|
| 194 |
|
| 195 |
```python
|
| 196 |
# Load important citations (enhanced with paper metadata)
|
| 197 |
-
important_citations = load_dataset("deepscholar-bench/DeepScholarBench", name="important_citations"
|
| 198 |
|
| 199 |
# This configuration includes both citation data AND the parent paper information
|
| 200 |
sample = important_citations[0]
|
|
|
|
| 141 |
from datasets import load_dataset
|
| 142 |
|
| 143 |
# Load papers dataset
|
| 144 |
+
papers = load_dataset("deepscholar-bench/DeepScholarBench", name="papers")["train"]
|
| 145 |
print(f"Loaded {len(papers)} papers")
|
| 146 |
|
| 147 |
# Load citations dataset
|
| 148 |
+
citations = load_dataset("deepscholar-bench/DeepScholarBench", name="citations")["train"]
|
| 149 |
print(f"Loaded {len(citations)} citations")
|
| 150 |
|
| 151 |
# Load important citations with enhanced metadata
|
| 152 |
+
important_citations = load_dataset("deepscholar-bench/DeepScholarBench", name="important_citations")["train"]
|
| 153 |
print(f"Loaded {len(important_citations)} important citations")
|
| 154 |
|
| 155 |
# Convert to pandas for analysis
|
| 156 |
papers_df = papers.to_pandas()
|
| 157 |
citations_df = citations.to_pandas()
|
| 158 |
+
important_citations_df = important_citations.to_pandas()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
```
|
| 160 |
|
| 161 |
### Example: Extract Related Works for a Paper
|
|
|
|
| 175 |
|
| 176 |
```python
|
| 177 |
# Load important citations (enhanced with paper metadata)
|
| 178 |
+
important_citations = load_dataset("deepscholar-bench/DeepScholarBench", name="important_citations")["train"]
|
| 179 |
|
| 180 |
# This configuration includes both citation data AND the parent paper information
|
| 181 |
sample = important_citations[0]
|