kargaranamir
commited on
Commit
•
6cc4300
1
Parent(s):
63ee51f
update instruction.
Browse files
README.md
CHANGED
@@ -6453,12 +6453,15 @@ Replace `bal-Arab` with your specific language.
|
|
6453 |
|
6454 |
```python
|
6455 |
from huggingface_hub import snapshot_download
|
|
|
6456 |
folder = snapshot_download(
|
6457 |
-
|
6458 |
-
|
6459 |
-
|
6460 |
-
|
6461 |
-
|
|
|
|
|
6462 |
```
|
6463 |
|
6464 |
|
@@ -6469,7 +6472,11 @@ Then you can load it with any library that supports Parquet files, such as Panda
|
|
6469 |
```python
|
6470 |
import pandas as pd
|
6471 |
|
|
|
|
|
6472 |
dataset = pd.read_parquet('./path/to/glotcc-v1/v1.0/bal-Arab/bal-Arab_0.parquet')
|
|
|
|
|
6473 |
print(dataset.head())
|
6474 |
```
|
6475 |
|
@@ -6478,10 +6485,16 @@ print(dataset.head())
|
|
6478 |
|
6479 |
```python
|
6480 |
from datasets import load_dataset
|
6481 |
-
|
|
|
6482 |
fw = load_dataset("cis-lmu/glotcc-v1", name="bal-Arab", split="train", streaming=True)
|
6483 |
|
6484 |
-
|
|
|
|
|
|
|
|
|
|
|
6485 |
```
|
6486 |
|
6487 |
|
|
|
6453 |
|
6454 |
```python
|
6455 |
from huggingface_hub import snapshot_download
|
6456 |
+
|
6457 |
folder = snapshot_download(
|
6458 |
+
"cis-lmu/glotcc-v1",
|
6459 |
+
repo_type="dataset",
|
6460 |
+
local_dir="./path/to/glotcc-v1/",
|
6461 |
+
# Replace "v1.0/bal-Arab/*" with the path for any other language available in the dataset
|
6462 |
+
allow_patterns="v1.0/bal-Arab/*"
|
6463 |
+
)
|
6464 |
+
|
6465 |
```
|
6466 |
|
6467 |
|
|
|
6472 |
```python
|
6473 |
import pandas as pd
|
6474 |
|
6475 |
+
# Load the dataset from a Parquet file
|
6476 |
+
# Replace the file path with the path to the desired language's Parquet file
|
6477 |
dataset = pd.read_parquet('./path/to/glotcc-v1/v1.0/bal-Arab/bal-Arab_0.parquet')
|
6478 |
+
|
6479 |
+
# Print the first 5 rows of the dataset
|
6480 |
print(dataset.head())
|
6481 |
```
|
6482 |
|
|
|
6485 |
|
6486 |
```python
|
6487 |
from datasets import load_dataset
|
6488 |
+
|
6489 |
+
# Replace "bal-Arab" with the name of any other language available in the dataset
|
6490 |
fw = load_dataset("cis-lmu/glotcc-v1", name="bal-Arab", split="train", streaming=True)
|
6491 |
|
6492 |
+
# Create an iterator from the streaming dataset
|
6493 |
+
iterator = iter(fw)
|
6494 |
+
|
6495 |
+
# Print the next item from the iterator
|
6496 |
+
print(next(iterator))
|
6497 |
+
|
6498 |
```
|
6499 |
|
6500 |
|