Update README.md
Browse files
README.md
CHANGED
@@ -2427,6 +2427,30 @@ configs:
|
|
2427 |
|
2428 |
## Additional Information
|
2429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2430 |
### Licensing Information
|
2431 |
|
2432 |
#### Wiki
|
|
|
2427 |
|
2428 |
## Additional Information
|
2429 |
|
2430 |
+
To load the dataset,
|
2431 |
+
|
2432 |
+
```
|
2433 |
+
import datasets
|
2434 |
+
from datasets import Image, Value, Sequence, ClassLabel, Features
|
2435 |
+
features = Features({'image': Image(mode=None, decode=True, id=None), 'filename': Value(dtype='string', id=None), 'words': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ocr_bboxes': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'label': ClassLabel(names=['AcademicJournal', 'AdultActor', 'Album', 'AmateurBoxer', 'Ambassador', 'AmericanFootballPlayer', 'Amphibian', 'AnimangaCharacter', 'Anime', 'Arachnid', 'Baronet', 'BasketballTeam', 'BeautyQueen', 'BroadcastNetwork', 'BusCompany', 'BusinessPerson', 'CanadianFootballTeam', 'Canal', 'Cardinal', 'Cave', 'ChristianBishop', 'ClassicalMusicArtist', 'ClassicalMusicComposition', 'CollegeCoach', 'Comedian', 'ComicsCreator', 'Congressman', 'Conifer', 'Convention', 'Cricketer', 'Crustacean', 'CultivatedVariety', 'Cycad', 'Dam', 'Economist', 'Engineer', 'Entomologist', 'EurovisionSongContestEntry', 'Fern', 'FilmFestival', 'Fish', 'FootballMatch', 'Glacier', 'GolfTournament', 'Governor', 'Gymnast', 'Historian', 'IceHockeyLeague', 'Insect', 'Journalist', 'Judge', 'Lighthouse', 'Magazine', 'Mayor', 'Medician', 'MemberOfParliament', 'MilitaryPerson', 'Model', 'Mollusca', 'Monarch', 'Moss', 'Mountain', 'MountainPass', 'MountainRange', 'MusicFestival', 'Musical', 'MythologicalFigure', 'Newspaper', 'Noble', 'OfficeHolder', 'Other', 'Philosopher', 'Photographer', 'PlayboyPlaymate', 'Poem', 'Poet', 'Pope', 'President', 'PrimeMinister', 'PublicTransitSystem', 'Racecourse', 'RadioHost', 'RadioStation', 'Religious', 'Reptile', 'Restaurant', 'Road', 'RoadTunnel', 'RollerCoaster', 'RugbyClub', 'RugbyLeague', 'Saint', 'School', 'ScreenWriter', 'Senator', 'ShoppingMall', 'Skater', 'SoccerLeague', 'SoccerManager', 'SoccerPlayer', 'SoccerTournament', 'SportsTeamMember', 'SumoWrestler', 'TelevisionStation', 'TennisTournament', 'TradeUnion', 'University', 'Village', 'VoiceActor', 'Volcano', 'WrestlingEvent'], id=None)})
|
2436 |
+
ds = datasets.load_dataset("AmazonScience/MultilingualMultiModalClassification", data_dir="wiki-doc-ar-merged", features=features, verification_mode="no_checks")
|
2437 |
+
print(ds)
|
2438 |
+
DatasetDict({
|
2439 |
+
train: Dataset({
|
2440 |
+
features: ['image', 'filename', 'words', 'ocr_bboxes', 'label'],
|
2441 |
+
num_rows: 8129
|
2442 |
+
})
|
2443 |
+
validation: Dataset({
|
2444 |
+
features: ['image', 'filename', 'words', 'ocr_bboxes', 'label'],
|
2445 |
+
num_rows: 1742
|
2446 |
+
})
|
2447 |
+
test: Dataset({
|
2448 |
+
features: ['image', 'filename', 'words', 'ocr_bboxes', 'label'],
|
2449 |
+
num_rows: 1743
|
2450 |
+
})
|
2451 |
+
})
|
2452 |
+
```
|
2453 |
+
|
2454 |
### Licensing Information
|
2455 |
|
2456 |
#### Wiki
|