Skip to content

Instantly share code, notes, and snippets.

@mommi84
Last active December 2, 2020 12:38
Show Gist options
  • Save mommi84/797e2825c9257a1aef929814b2c2d73a to your computer and use it in GitHub Desktop.
Save mommi84/797e2825c9257a1aef929814b2c2d73a to your computer and use it in GitHub Desktop.
Code for DBpedia Ontology as a radial dendogram.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"name": "owl:Thing",
"children": [
{
"name": "Media",
"value": 1
},
{
"name": "UnitOfWork",
"children": [
{
"name": "Project",
"children": [
{
"name": "ResearchProject",
"value": 1
}
]
},
{
"name": "Case",
"children": [
{
"name": "LegalCase",
"children": [
{
"name": "SupremeCourtOfTheUnitedStatesCase",
"value": 1
}
]
}
]
}
]
},
{
"name": "Name",
"children": [
{
"name": "Surname",
"value": 1
},
{
"name": "GivenName",
"value": 1
}
]
},
{
"name": "Currency",
"value": 1
},
{
"name": "Area",
"value": 1
},
{
"name": "PersonFunction",
"children": [
{
"name": "PoliticalFunction",
"value": 1
},
{
"name": "Profession",
"value": 1
}
]
},
{
"name": "SportCompetitionResult",
"children": [
{
"name": "OlympicResult",
"value": 1
},
{
"name": "SnookerWorldRanking",
"value": 1
}
]
},
{
"name": "MeanOfTransportation",
"children": [
{
"name": "Tram",
"value": 1
},
{
"name": "Aircraft",
"children": [
{
"name": "MilitaryAircraft",
"value": 1
}
]
},
{
"name": "Rocket",
"value": 1
},
{
"name": "Spacecraft",
"value": 1
},
{
"name": "MilitaryVehicle",
"value": 1
},
{
"name": "TrainCarriage",
"value": 1
},
{
"name": "Locomotive",
"value": 1
},
{
"name": "On-SiteTransportation",
"children": [
{
"name": "MovingWalkway",
"value": 1
},
{
"name": "Escalator",
"value": 1
},
{
"name": "ConveyorSystem",
"value": 1
}
]
},
{
"name": "Train",
"value": 1
},
{
"name": "Motorcycle",
"value": 1
},
{
"name": "SpaceStation",
"value": 1
},
{
"name": "SpaceShuttle",
"value": 1
},
{
"name": "Ship",
"value": 1
},
{
"name": "Automobile",
"value": 1
}
]
},
{
"name": "GrossDomesticProduct",
"value": 1
},
{
"name": "Agent",
"children": [
{
"name": "Deity",
"value": 1
},
{
"name": "Organisation",
"children": [
{
"name": "EducationalInstitution",
"children": [
{
"name": "School",
"value": 1
},
{
"name": "College",
"value": 1
},
{
"name": "Library",
"value": 1
},
{
"name": "University",
"value": 1
}
]
},
{
"name": "Broadcaster",
"children": [
{
"name": "BroadcastNetwork",
"value": 1
},
{
"name": "TelevisionStation",
"value": 1
},
{
"name": "RadioStation",
"value": 1
}
]
},
{
"name": "GeopoliticalOrganisation",
"value": 1
},
{
"name": "PublicTransitSystem",
"value": 1
},
{
"name": "SambaSchool",
"value": 1
},
{
"name": "SportsLeague",
"children": [
{
"name": "CricketLeague",
"value": 1
},
{
"name": "AutoRacingLeague",
"value": 1
},
{
"name": "BaseballLeague",
"value": 1
},
{
"name": "FormulaOneRacing",
"value": 1
},
{
"name": "MixedMartialArtsLeague",
"value": 1
},
{
"name": "AustralianFootballLeague",
"value": 1
},
{
"name": "RugbyLeague",
"value": 1
},
{
"name": "SpeedwayLeague",
"value": 1
},
{
"name": "PaintballLeague",
"value": 1
},
{
"name": "LacrosseLeague",
"value": 1
},
{
"name": "CurlingLeague",
"value": 1
},
{
"name": "AmericanFootballLeague",
"value": 1
},
{
"name": "MotorcycleRacingLeague",
"value": 1
},
{
"name": "SoccerLeague",
"value": 1
},
{
"name": "CyclingLeague",
"value": 1
},
{
"name": "PoloLeague",
"value": 1
},
{
"name": "CanadianFootballLeague",
"value": 1
},
{
"name": "BowlingLeague",
"value": 1
},
{
"name": "RadioControlledRacingLeague",
"value": 1
},
{
"name": "TennisLeague",
"value": 1
},
{
"name": "HandballLeague",
"value": 1
},
{
"name": "FieldHockeyLeague",
"value": 1
},
{
"name": "GolfLeague",
"value": 1
},
{
"name": "BoxingLeague",
"value": 1
},
{
"name": "IceHockeyLeague",
"value": 1
},
{
"name": "VolleyballLeague",
"value": 1
},
{
"name": "InlineHockeyLeague",
"value": 1
},
{
"name": "SoftballLeague",
"value": 1
},
{
"name": "VideogamesLeague",
"value": 1
},
{
"name": "BasketballLeague",
"value": 1
}
]
},
{
"name": "MilitaryUnit",
"value": 1
},
{
"name": "GovernmentAgency",
"children": [
{
"name": "GovernmentCabinet",
"value": 1
}
]
},
{
"name": "Group",
"children": [
{
"name": "Band",
"value": 1
},
{
"name": "ComedyGroup",
"value": 1
}
]
},
{
"name": "EmployersOrganisation",
"value": 1
},
{
"name": "TradeUnion",
"value": 1
},
{
"name": "TermOfOffice",
"value": 1
},
{
"name": "SportsTeam",
"children": [
{
"name": "SoccerClub",
"children": [
{
"name": "NationalSoccerClub",
"value": 1
}
]
},
{
"name": "BasketballTeam",
"value": 1
},
{
"name": "CricketTeam",
"value": 1
},
{
"name": "AmericanFootballTeam",
"value": 1
},
{
"name": "FormulaOneTeam",
"value": 1
},
{
"name": "AustralianFootballTeam",
"value": 1
},
{
"name": "CanadianFootballTeam",
"value": 1
},
{
"name": "CyclingTeam",
"value": 1
},
{
"name": "SpeedwayTeam",
"value": 1
},
{
"name": "HandballTeam",
"value": 1
},
{
"name": "BaseballTeam",
"value": 1
},
{
"name": "HockeyTeam",
"value": 1
},
{
"name": "RugbyClub",
"value": 1
}
]
},
{
"name": "Parliament",
"value": 1
},
{
"name": "Company",
"children": [
{
"name": "Winery",
"value": 1
},
{
"name": "Bank",
"value": 1
},
{
"name": "LawFirm",
"value": 1
},
{
"name": "RecordLabel",
"value": 1
},
{
"name": "Brewery",
"value": 1
},
{
"name": "Caterer",
"value": 1
},
{
"name": "Airline",
"value": 1
},
{
"name": "Publisher",
"value": 1
},
{
"name": "BusCompany",
"value": 1
}
]
},
{
"name": "InternationalOrganisation",
"value": 1
},
{
"name": "ReligiousOrganisation",
"children": [
{
"name": "ClericalOrder",
"value": 1
}
]
},
{
"name": "Non-ProfitOrganisation",
"children": [
{
"name": "RecordOffice",
"value": 1
}
]
},
{
"name": "SportsClub",
"children": [
{
"name": "HockeyClub",
"value": 1
}
]
},
{
"name": "PoliticalParty",
"value": 1
},
{
"name": "Legislature",
"value": 1
}
]
},
{
"name": "Person",
"children": [
{
"name": "Aristocrat",
"value": 1
},
{
"name": "FictionalCharacter",
"children": [
{
"name": "MythologicalFigure",
"value": 1
},
{
"name": "SoapCharacter",
"value": 1
},
{
"name": "ComicsCharacter",
"children": [
{
"name": "AnimangaCharacter",
"value": 1
}
]
},
{
"name": "NarutoCharacter",
"value": 1
},
{
"name": "DisneyCharacter",
"value": 1
}
]
},
{
"name": "Producer",
"value": 1
},
{
"name": "Economist",
"value": 1
},
{
"name": "Engineer",
"value": 1
},
{
"name": "Judge",
"value": 1
},
{
"name": "TelevisionDirector",
"value": 1
},
{
"name": "BusinessPerson",
"value": 1
},
{
"name": "Orphan",
"value": 1
},
{
"name": "PlayboyPlaymate",
"value": 1
},
{
"name": "RomanEmperor",
"value": 1
},
{
"name": "OrganisationMember",
"children": [
{
"name": "SportsTeamMember",
"value": 1
}
]
},
{
"name": "Religious",
"value": 1
},
{
"name": "Farmer",
"value": 1
},
{
"name": "Cleric",
"children": [
{
"name": "Cardinal",
"value": 1
},
{
"name": "ChristianPatriarch",
"value": 1
},
{
"name": "Pope",
"value": 1
},
{
"name": "ChristianBishop",
"value": 1
},
{
"name": "Saint",
"value": 1
},
{
"name": "Vicar",
"value": 1
},
{
"name": "Priest",
"value": 1
}
]
},
{
"name": "Chef",
"value": 1
},
{
"name": "TelevisionPersonality",
"children": [
{
"name": "Host",
"value": 1
}
]
},
{
"name": "Referee",
"value": 1
},
{
"name": "Model",
"value": 1
},
{
"name": "Politician",
"children": [
{
"name": "Governor",
"value": 1
},
{
"name": "Senator",
"value": 1
},
{
"name": "Deputy",
"value": 1
},
{
"name": "Mayor",
"value": 1
},
{
"name": "VicePrimeMinister",
"value": 1
},
{
"name": "MemberOfParliament",
"value": 1
},
{
"name": "PrimeMinister",
"value": 1
},
{
"name": "VicePresident",
"value": 1
},
{
"name": "President",
"value": 1
},
{
"name": "Chancellor",
"value": 1
},
{
"name": "Congressman",
"value": 1
},
{
"name": "Lieutenant",
"value": 1
}
]
},
{
"name": "Architect",
"value": 1
},
{
"name": "Psychologist",
"value": 1
},
{
"name": "Philosopher",
"value": 1
},
{
"name": "Archeologist",
"value": 1
},
{
"name": "BeautyQueen",
"value": 1
},
{
"name": "Artist",
"children": [
{
"name": "FashionDesigner",
"value": 1
},
{
"name": "Photographer",
"value": 1
},
{
"name": "Comedian",
"value": 1
},
{
"name": "Sculptor",
"value": 1
},
{
"name": "Dancer",
"value": 1
},
{
"name": "Painter",
"value": 1
},
{
"name": "ComicsCreator",
"value": 1
},
{
"name": "Humorist",
"value": 1
},
{
"name": "Actor",
"children": [
{
"name": "AdultActor",
"value": 1
},
{
"name": "VoiceActor",
"value": 1
}
]
},
{
"name": "MusicalArtist",
"children": [
{
"name": "BackScene",
"value": 1
},
{
"name": "Singer",
"value": 1
},
{
"name": "ClassicalMusicArtist",
"value": 1
},
{
"name": "Instrumentalist",
"children": [
{
"name": "Guitarist",
"value": 1
}
]
},
{
"name": "MusicDirector",
"value": 1
}
]
}
]
},
{
"name": "Celebrity",
"value": 1
},
{
"name": "Presenter",
"children": [
{
"name": "TelevisionHost",
"value": 1
},
{
"name": "RadioHost",
"value": 1
}
]
},
{
"name": "SportsManager",
"children": [
{
"name": "SoccerManager",
"value": 1
}
]
},
{
"name": "HorseTrainer",
"value": 1
},
{
"name": "Monarch",
"value": 1
},
{
"name": "MovieDirector",
"value": 1
},
{
"name": "Coach",
"children": [
{
"name": "VolleyballCoach",
"value": 1
},
{
"name": "AmericanFootballCoach",
"value": 1
},
{
"name": "CollegeCoach",
"value": 1
}
]
},
{
"name": "OfficeHolder",
"value": 1
},
{
"name": "MemberResistanceMovement",
"value": 1
},
{
"name": "Athlete",
"children": [
{
"name": "BaseballPlayer",
"value": 1
},
{
"name": "NetballPlayer",
"value": 1
},
{
"name": "Canoeist",
"value": 1
},
{
"name": "Rower",
"value": 1
},
{
"name": "NationalCollegiateAthleticAssociationAthlete",
"value": 1
},
{
"name": "ChessPlayer",
"value": 1
},
{
"name": "VolleyballPlayer",
"children": [
{
"name": "BeachVolleyballPlayer",
"value": 1
}
]
},
{
"name": "WaterPoloPlayer",
"value": 1
},
{
"name": "HighDiver",
"value": 1
},
{
"name": "AustralianRulesFootballPlayer",
"value": 1
},
{
"name": "RugbyPlayer",
"value": 1
},
{
"name": "Swimmer",
"value": 1
},
{
"name": "DartsPlayer",
"value": 1
},
{
"name": "GolfPlayer",
"value": 1
},
{
"name": "Fencer",
"value": 1
},
{
"name": "BasketballPlayer",
"value": 1
},
{
"name": "MartialArtist",
"value": 1
},
{
"name": "SoccerPlayer",
"value": 1
},
{
"name": "SquashPlayer",
"value": 1
},
{
"name": "TennisPlayer",
"value": 1
},
{
"name": "LacrossePlayer",
"value": 1
},
{
"name": "Wrestler",
"children": [
{
"name": "SumoWrestler",
"value": 1
}
]
},
{
"name": "BullFighter",
"value": 1
},
{
"name": "BadmintonPlayer",
"value": 1
},
{
"name": "GridironFootballPlayer",
"children": [
{
"name": "AmericanFootballPlayer",
"value": 1
},
{
"name": "CanadianFootballPlayer",
"value": 1
}
]
},
{
"name": "Cyclist",
"value": 1
},
{
"name": "SnookerPlayer",
"children": [
{
"name": "SnookerChamp",
"value": 1
}
]
},
{
"name": "Cricketer",
"value": 1
},
{
"name": "PokerPlayer",
"value": 1
},
{
"name": "WinterSportPlayer",
"children": [
{
"name": "IceHockeyPlayer",
"value": 1
},
{
"name": "Biathlete",
"value": 1
},
{
"name": "FigureSkater",
"value": 1
},
{
"name": "Curler",
"value": 1
},
{
"name": "SpeedSkater",
"value": 1
},
{
"name": "NordicCombined",
"value": 1
},
{
"name": "Skier",
"value": 1
},
{
"name": "BobsleighAthlete",
"value": 1
},
{
"name": "Skater",
"value": 1
},
{
"name": "Ski_jumper",
"value": 1
},
{
"name": "CrossCountrySkier",
"value": 1
}
]
},
{
"name": "Boxer",
"children": [
{
"name": "AmateurBoxer",
"value": 1
}
]
},
{
"name": "Bodybuilder",
"value": 1
},
{
"name": "Gymnast",
"value": 1
},
{
"name": "GaelicGamesPlayer",
"value": 1
},
{
"name": "MotorsportRacer",
"children": [
{
"name": "MotorcycleRider",
"children": [
{
"name": "SpeedwayRider",
"value": 1
},
{
"name": "MotocycleRacer",
"value": 1
}
]
},
{
"name": "RacingDriver",
"children": [
{
"name": "DTMRacer",
"value": 1
},
{
"name": "FormulaOneRacer",
"value": 1
},
{
"name": "NascarDriver",
"value": 1
},
{
"name": "RallyDriver",
"value": 1
}
]
}
]
},
{
"name": "AthleticsPlayer",
"value": 1
},
{
"name": "ArcherPlayer",
"value": 1
},
{
"name": "HorseRider",
"value": 1
},
{
"name": "HandballPlayer",
"value": 1
},
{
"name": "Jockey",
"value": 1
},
{
"name": "TableTennisPlayer",
"value": 1
},
{
"name": "Surfer",
"value": 1
},
{
"name": "TeamMember",
"value": 1
}
]
},
{
"name": "PoliticianSpouse",
"value": 1
},
{
"name": "Scientist",
"children": [
{
"name": "Medician",
"value": 1
},
{
"name": "Professor",
"value": 1
},
{
"name": "Biologist",
"value": 1
},
{
"name": "Entomologist",
"value": 1
}
]
},
{
"name": "TheatreDirector",
"value": 1
},
{
"name": "Linguist",
"value": 1
},
{
"name": "MilitaryPerson",
"value": 1
},
{
"name": "Writer",
"children": [
{
"name": "MusicComposer",
"value": 1
},
{
"name": "Historian",
"value": 1
},
{
"name": "Poet",
"value": 1
},
{
"name": "PlayWright",
"value": 1
},
{
"name": "ScreenWriter",
"value": 1
},
{
"name": "SongWriter",
"value": 1
}
]
},
{
"name": "Journalist",
"value": 1
},
{
"name": "Noble",
"value": 1
},
{
"name": "Ambassador",
"value": 1
},
{
"name": "Astronaut",
"value": 1
},
{
"name": "Criminal",
"children": [
{
"name": "Murderer",
"children": [
{
"name": "SerialKiller",
"value": 1
}
]
}
]
},
{
"name": "Lawyer",
"value": 1
},
{
"name": "Royalty",
"children": [
{
"name": "BritishRoyalty",
"children": [
{
"name": "Baronet",
"value": 1
}
]
}
]
},
{
"name": "Egyptologist",
"value": 1
}
]
},
{
"name": "Family",
"children": [
{
"name": "NobleFamily",
"value": 1
}
]
},
{
"name": "Employer",
"value": 1
}
]
},
{
"name": "List",
"children": [
{
"name": "TrackList",
"value": 1
}
]
},
{
"name": "Unknown",
"value": 1
},
{
"name": "Language",
"children": [
{
"name": "ProgrammingLanguage",
"value": 1
}
]
},
{
"name": "Polyhedron",
"value": 1
},
{
"name": "Relationship",
"children": [
{
"name": "Ratio",
"value": 1
}
]
},
{
"name": "GeneLocation",
"children": [
{
"name": "HumanGeneLocation",
"value": 1
},
{
"name": "MouseGeneLocation",
"value": 1
}
]
},
{
"name": "TimePeriod",
"children": [
{
"name": "CareerStation",
"value": 1
},
{
"name": "HistoricalPeriod",
"value": 1
},
{
"name": "ProtohistoricalPeriod",
"value": 1
},
{
"name": "PrehistoricalPeriod",
"value": 1
},
{
"name": "Year",
"value": 1
},
{
"name": "YearInSpaceflight",
"value": 1
},
{
"name": "PeriodOfArtisticStyle",
"value": 1
},
{
"name": "GeologicalPeriod",
"value": 1
}
]
},
{
"name": "ElectionDiagram",
"value": 1
},
{
"name": "Demographics",
"value": 1
},
{
"name": "Depth",
"value": 1
},
{
"name": "Flag",
"value": 1
},
{
"name": "Food",
"children": [
{
"name": "Beverage",
"children": [
{
"name": "Vodka",
"value": 1
},
{
"name": "Beer",
"value": 1
},
{
"name": "Wine",
"children": [
{
"name": "ControlledDesignationOfOriginWine",
"value": 1
}
]
}
]
},
{
"name": "Cheese",
"value": 1
}
]
},
{
"name": "Disease",
"value": 1
},
{
"name": "AnatomicalStructure",
"children": [
{
"name": "Muscle",
"value": 1
},
{
"name": "Bone",
"value": 1
},
{
"name": "Nerve",
"value": 1
},
{
"name": "Vein",
"value": 1
},
{
"name": "Ligament",
"value": 1
},
{
"name": "Brain",
"value": 1
},
{
"name": "Artery",
"value": 1
},
{
"name": "Embryology",
"value": 1
},
{
"name": "BloodVessel",
"value": 1
},
{
"name": "Lymph",
"value": 1
}
]
},
{
"name": "Holiday",
"value": 1
},
{
"name": "ChartsPlacements",
"value": 1
},
{
"name": "Medicine",
"value": 1
},
{
"name": "Place",
"children": [
{
"name": "CountrySeat",
"value": 1
},
{
"name": "PopulatedPlace",
"children": [
{
"name": "Street",
"value": 1
},
{
"name": "Territory",
"children": [
{
"name": "OldTerritory",
"value": 1
}
]
},
{
"name": "Agglomeration",
"value": 1
},
{
"name": "Settlement",
"children": [
{
"name": "City",
"children": [
{
"name": "Capital",
"value": 1
},
{
"name": "CapitalOfRegion",
"value": 1
}
]
},
{
"name": "HistoricalSettlement",
"value": 1
},
{
"name": "Village",
"value": 1
},
{
"name": "CityDistrict",
"value": 1
},
{
"name": "Town",
"value": 1
}
]
},
{
"name": "Continent",
"value": 1
},
{
"name": "GatedCommunity",
"value": 1
},
{
"name": "Locality",
"value": 1
},
{
"name": "Region",
"children": [
{
"name": "AdministrativeRegion",
"children": [
{
"name": "ClericalAdministrativeRegion",
"children": [
{
"name": "Diocese",
"value": 1
},
{
"name": "Parish",
"value": 1
},
{
"name": "Deanery",
"value": 1
}
]
},
{
"name": "HistoricalAreaOfAuthority",
"children": [
{
"name": "Fiefdom",
"value": 1
}
]
},
{
"name": "GovernmentalAdministrativeRegion",
"children": [
{
"name": "Regency",
"value": 1
},
{
"name": "Canton",
"value": 1
},
{
"name": "MicroRegion",
"value": 1
},
{
"name": "Arrondissement",
"value": 1
},
{
"name": "Prefecture",
"value": 1
},
{
"name": "District",
"children": [
{
"name": "HistoricalDistrict",
"value": 1
}
]
},
{
"name": "DistrictWaterBoard",
"value": 1
},
{
"name": "Province",
"children": [
{
"name": "HistoricalProvince",
"value": 1
}
]
},
{
"name": "Municipality",
"children": [
{
"name": "FormerMunicipality",
"value": 1
}
]
},
{
"name": "Department",
"children": [
{
"name": "OverseasDepartment",
"value": 1
}
]
},
{
"name": "SubMunicipality",
"value": 1
}
]
}
]
},
{
"name": "HistoricalRegion",
"value": 1
},
{
"name": "NaturalRegion",
"value": 1
}
]
},
{
"name": "Country",
"children": [
{
"name": "HistoricalCountry",
"value": 1
}
]
},
{
"name": "Island",
"children": [
{
"name": "Atoll",
"value": 1
}
]
},
{
"name": "Community",
"value": 1
},
{
"name": "State",
"value": 1
},
{
"name": "Intercommunality",
"value": 1
}
]
},
{
"name": "Cemetery",
"value": 1
},
{
"name": "SiteOfSpecialScientificInterest",
"value": 1
},
{
"name": "WorldHeritageSite",
"value": 1
},
{
"name": "Garden",
"value": 1
},
{
"name": "WineRegion",
"value": 1
},
{
"name": "NaturalPlace",
"children": [
{
"name": "Archipelago",
"value": 1
},
{
"name": "BodyOfWater",
"children": [
{
"name": "Stream",
"children": [
{
"name": "River",
"value": 1
},
{
"name": "Canal",
"value": 1
},
{
"name": "Creek",
"value": 1
}
]
},
{
"name": "Sea",
"value": 1
},
{
"name": "Ocean",
"value": 1
},
{
"name": "Bay",
"value": 1
},
{
"name": "Lake",
"value": 1
}
]
},
{
"name": "Mountain",
"value": 1
},
{
"name": "MountainPass",
"value": 1
},
{
"name": "MountainRange",
"value": 1
},
{
"name": "Valley",
"value": 1
},
{
"name": "Cape",
"value": 1
},
{
"name": "Glacier",
"value": 1
},
{
"name": "Crater",
"children": [
{
"name": "LunarCrater",
"value": 1
}
]
},
{
"name": "Volcano",
"value": 1
},
{
"name": "Beach",
"value": 1
},
{
"name": "Desert",
"value": 1
},
{
"name": "Forest",
"value": 1
},
{
"name": "HotSpring",
"value": 1
},
{
"name": "Cave",
"value": 1
}
]
},
{
"name": "HistoricPlace",
"value": 1
},
{
"name": "Mine",
"children": [
{
"name": "CoalPit",
"value": 1
}
]
},
{
"name": "ProtectedArea",
"value": 1
},
{
"name": "Monument",
"children": [
{
"name": "Memorial",
"value": 1
},
{
"name": "GraveMonument",
"value": 1
}
]
},
{
"name": "ConcentrationCamp",
"value": 1
},
{
"name": "ArchitecturalStructure",
"children": [
{
"name": "SportFacility",
"children": [
{
"name": "GolfCourse",
"value": 1
},
{
"name": "SkiArea",
"children": [
{
"name": "SkiResort",
"value": 1
}
]
},
{
"name": "Stadium",
"value": 1
},
{
"name": "RaceTrack",
"children": [
{
"name": "Racecourse",
"value": 1
}
]
},
{
"name": "CricketGround",
"value": 1
}
]
},
{
"name": "MilitaryStructure",
"children": [
{
"name": "Fort",
"value": 1
}
]
},
{
"name": "Tunnel",
"value": 1
},
{
"name": "Tower",
"children": [
{
"name": "WaterTower",
"value": 1
},
{
"name": "Lighthouse",
"value": 1
}
]
},
{
"name": "Infrastructure",
"children": [
{
"name": "RouteOfTransportation",
"children": [
{
"name": "WaterwayTunnel",
"value": 1
},
{
"name": "Bridge",
"value": 1
},
{
"name": "Road",
"value": 1
},
{
"name": "RailwayLine",
"value": 1
},
{
"name": "RailwayTunnel",
"value": 1
},
{
"name": "RoadJunction",
"value": 1
},
{
"name": "RoadTunnel",
"value": 1
}
]
},
{
"name": "Lock",
"value": 1
},
{
"name": "Airport",
"value": 1
},
{
"name": "PowerStation",
"children": [
{
"name": "NuclearPowerStation",
"value": 1
}
]
},
{
"name": "LaunchPad",
"value": 1
},
{
"name": "RestArea",
"value": 1
},
{
"name": "Port",
"value": 1
},
{
"name": "Station",
"children": [
{
"name": "MetroStation",
"value": 1
},
{
"name": "FillingStation",
"value": 1
},
{
"name": "TramStation",
"value": 1
},
{
"name": "RailwayStation",
"value": 1
},
{
"name": "ElectricalSubstation",
"value": 1
}
]
},
{
"name": "Dam",
"value": 1
},
{
"name": "Dike",
"value": 1
}
]
},
{
"name": "Venue",
"children": [
{
"name": "Theatre",
"value": 1
}
]
},
{
"name": "Gate",
"value": 1
},
{
"name": "Zoo",
"value": 1
},
{
"name": "Square",
"value": 1
},
{
"name": "Pyramid",
"value": 1
},
{
"name": "Mill",
"children": [
{
"name": "Watermill",
"value": 1
},
{
"name": "Treadmill",
"value": 1
},
{
"name": "WindMotor",
"value": 1
},
{
"name": "Windmill",
"value": 1
}
]
},
{
"name": "Arena",
"value": 1
},
{
"name": "AmusementParkAttraction",
"children": [
{
"name": "WaterRide",
"value": 1
},
{
"name": "RollerCoaster",
"value": 1
}
]
},
{
"name": "Building",
"children": [
{
"name": "Library",
"value": 1
},
{
"name": "Hotel",
"value": 1
},
{
"name": "Skyscraper",
"value": 1
},
{
"name": "HistoricBuilding",
"value": 1
},
{
"name": "ShoppingMall",
"value": 1
},
{
"name": "ReligiousBuilding",
"children": [
{
"name": "Monastery",
"value": 1
},
{
"name": "Temple",
"value": 1
},
{
"name": "Abbey",
"value": 1
},
{
"name": "Mosque",
"value": 1
},
{
"name": "Church",
"value": 1
},
{
"name": "Synagogue",
"value": 1
},
{
"name": "Shrine",
"value": 1
}
]
},
{
"name": "Casino",
"value": 1
},
{
"name": "Hospital",
"value": 1
},
{
"name": "Restaurant",
"value": 1
},
{
"name": "Factory",
"value": 1
},
{
"name": "Museum",
"value": 1
},
{
"name": "Prison",
"value": 1
},
{
"name": "Castle",
"value": 1
}
]
}
]
},
{
"name": "CelestialBody",
"children": [
{
"name": "Star",
"children": [
{
"name": "BrownDwarf",
"value": 1
}
]
},
{
"name": "Planet",
"value": 1
},
{
"name": "Satellite",
"children": [
{
"name": "ArtificialSatellite",
"value": 1
}
]
},
{
"name": "Asteroid",
"value": 1
},
{
"name": "Swarm",
"children": [
{
"name": "Globularswarm",
"value": 1
},
{
"name": "Openswarm",
"value": 1
}
]
},
{
"name": "Galaxy",
"value": 1
},
{
"name": "Constellation",
"value": 1
}
]
},
{
"name": "Park",
"value": 1
}
]
},
{
"name": "RouteStop",
"value": 1
},
{
"name": "Work",
"children": [
{
"name": "Document",
"children": [
{
"name": "Image",
"children": [
{
"name": "MovingImage",
"value": 1
},
{
"name": "StillImage",
"value": 1
}
]
},
{
"name": "File",
"value": 1
},
{
"name": "Sound",
"value": 1
}
]
},
{
"name": "Cartoon",
"children": [
{
"name": "Anime",
"value": 1
},
{
"name": "HollywoodCartoon",
"value": 1
}
]
},
{
"name": "Database",
"children": [
{
"name": "BiologicalDatabase",
"value": 1
}
]
},
{
"name": "CollectionOfValuables",
"children": [
{
"name": "Archive",
"value": 1
}
]
},
{
"name": "LineOfFashion",
"value": 1
},
{
"name": "Software",
"children": [
{
"name": "VideoGame",
"value": 1
}
]
},
{
"name": "TelevisionSeason",
"value": 1
},
{
"name": "TelevisionShow",
"value": 1
},
{
"name": "Website",
"value": 1
},
{
"name": "RadioProgram",
"value": 1
},
{
"name": "MusicalWork",
"children": [
{
"name": "Opera",
"value": 1
},
{
"name": "Musical",
"value": 1
},
{
"name": "ArtistDiscography",
"value": 1
},
{
"name": "Single",
"value": 1
},
{
"name": "Song",
"children": [
{
"name": "EurovisionSongContestEntry",
"value": 1
}
]
},
{
"name": "ClassicalMusicComposition",
"value": 1
},
{
"name": "NationalAnthem",
"value": 1
},
{
"name": "Album",
"value": 1
}
]
},
{
"name": "TelevisionEpisode",
"value": 1
},
{
"name": "Film",
"value": 1
},
{
"name": "WrittenWork",
"children": [
{
"name": "Drama",
"value": 1
},
{
"name": "StatedResolution",
"value": 1
},
{
"name": "PeriodicalLiterature",
"children": [
{
"name": "UndergroundJournal",
"value": 1
},
{
"name": "AcademicJournal",
"value": 1
},
{
"name": "Newspaper",
"value": 1
},
{
"name": "Magazine",
"value": 1
}
]
},
{
"name": "Resume",
"value": 1
},
{
"name": "Letter",
"value": 1
},
{
"name": "Law",
"value": 1
},
{
"name": "Quote",
"value": 1
},
{
"name": "Book",
"children": [
{
"name": "Novel",
"children": [
{
"name": "LightNovel",
"value": 1
}
]
}
]
},
{
"name": "Article",
"value": 1
},
{
"name": "Poem",
"value": 1
},
{
"name": "MultiVolumePublication",
"value": 1
},
{
"name": "Play",
"value": 1
},
{
"name": "Annotation",
"children": [
{
"name": "Reference",
"value": 1
}
]
},
{
"name": "Treaty",
"value": 1
},
{
"name": "Comic",
"children": [
{
"name": "ComicStrip",
"value": 1
},
{
"name": "Manga",
"value": 1
},
{
"name": "Manhwa",
"value": 1
},
{
"name": "Manhua",
"value": 1
}
]
}
]
},
{
"name": "Artwork",
"children": [
{
"name": "Painting",
"value": 1
},
{
"name": "Sculpture",
"value": 1
}
]
}
]
},
{
"name": "Biomolecule",
"children": [
{
"name": "Polysaccharide",
"value": 1
},
{
"name": "Enzyme",
"value": 1
},
{
"name": "Gene",
"children": [
{
"name": "MouseGene",
"value": 1
},
{
"name": "HumanGene",
"value": 1
}
]
},
{
"name": "Lipid",
"value": 1
},
{
"name": "Protein",
"value": 1
},
{
"name": "Hormone",
"value": 1
}
]
},
{
"name": "Device",
"children": [
{
"name": "Engine",
"children": [
{
"name": "RocketEngine",
"value": 1
},
{
"name": "AutomobileEngine",
"value": 1
}
]
},
{
"name": "MobilePhone",
"value": 1
},
{
"name": "Weapon",
"value": 1
},
{
"name": "Instrument",
"children": [
{
"name": "Organ",
"value": 1
},
{
"name": "Guitar",
"value": 1
}
]
},
{
"name": "Camera",
"children": [
{
"name": "DigitalCamera",
"value": 1
}
]
},
{
"name": "InformationAppliance",
"value": 1
}
]
},
{
"name": "Award",
"children": [
{
"name": "NobelPrize",
"value": 1
},
{
"name": "Decoration",
"value": 1
}
]
},
{
"name": "Diploma",
"value": 1
},
{
"name": "PenaltyShootOut",
"value": 1
},
{
"name": "PublicService",
"value": 1
},
{
"name": "SportsSeason",
"children": [
{
"name": "MotorsportSeason",
"value": 1
},
{
"name": "SportsTeamSeason",
"children": [
{
"name": "SoccerClubSeason",
"value": 1
},
{
"name": "BaseballSeason",
"value": 1
},
{
"name": "SoccerLeagueSeason",
"value": 1
},
{
"name": "FootballLeagueSeason",
"children": [
{
"name": "NationalFootballLeagueSeason",
"value": 1
}
]
},
{
"name": "NCAATeamSeason",
"value": 1
}
]
}
]
},
{
"name": "ChemicalSubstance",
"children": [
{
"name": "Drug",
"value": 1
},
{
"name": "ChemicalCompound",
"value": 1
},
{
"name": "Mineral",
"value": 1
},
{
"name": "ChemicalElement",
"value": 1
}
]
},
{
"name": "Event",
"children": [
{
"name": "NaturalEvent",
"children": [
{
"name": "Earthquake",
"value": 1
},
{
"name": "StormSurge",
"value": 1
},
{
"name": "SolarEclipse",
"value": 1
}
]
},
{
"name": "SocietalEvent",
"children": [
{
"name": "FilmFestival",
"value": 1
},
{
"name": "Attack",
"value": 1
},
{
"name": "Election",
"value": 1
},
{
"name": "MilitaryConflict",
"value": 1
},
{
"name": "MusicFestival",
"value": 1
},
{
"name": "Meeting",
"value": 1
},
{
"name": "AcademicConference",
"value": 1
},
{
"name": "SportsEvent",
"children": [
{
"name": "InternationalFootballLeagueEvent",
"value": 1
},
{
"name": "NationalFootballLeagueEvent",
"value": 1
},
{
"name": "FootballMatch",
"value": 1
},
{
"name": "GrandPrix",
"value": 1
},
{
"name": "CyclingCompetition",
"value": 1
},
{
"name": "Race",
"children": [
{
"name": "CyclingRace",
"value": 1
},
{
"name": "MotorRace",
"value": 1
},
{
"name": "HorseRace",
"value": 1
}
]
},
{
"name": "Tournament",
"children": [
{
"name": "WomensTennisAssociationTournament",
"value": 1
},
{
"name": "TennisTournament",
"value": 1
},
{
"name": "SoccerTournament",
"value": 1
},
{
"name": "GolfTournament",
"value": 1
}
]
},
{
"name": "Olympics",
"children": [
{
"name": "OlympicEvent",
"value": 1
}
]
},
{
"name": "WrestlingEvent",
"value": 1
},
{
"name": "MixedMartialArtsEvent",
"value": 1
}
]
},
{
"name": "Rebellion",
"value": 1
},
{
"name": "Convention",
"value": 1
},
{
"name": "SpaceMission",
"value": 1
}
]
},
{
"name": "Competition",
"children": [
{
"name": "Contest",
"value": 1
}
]
},
{
"name": "LifeCycleEvent",
"children": [
{
"name": "PersonalEvent",
"children": [
{
"name": "Death",
"value": 1
},
{
"name": "Marriage",
"value": 1
},
{
"name": "Divorce",
"value": 1
},
{
"name": "Birth",
"value": 1
}
]
}
]
}
]
},
{
"name": "Species",
"children": [
{
"name": "Eukaryote",
"children": [
{
"name": "Plant",
"children": [
{
"name": "Ginkgo",
"value": 1
},
{
"name": "Fern",
"value": 1
},
{
"name": "ClubMoss",
"value": 1
},
{
"name": "GreenAlga",
"value": 1
},
{
"name": "Cycad",
"value": 1
},
{
"name": "Conifer",
"value": 1
},
{
"name": "FloweringPlant",
"children": [
{
"name": "Grape",
"value": 1
}
]
},
{
"name": "CultivatedVariety",
"value": 1
},
{
"name": "Gnetophytes",
"value": 1
},
{
"name": "Moss",
"value": 1
}
]
},
{
"name": "Fungus",
"value": 1
},
{
"name": "Animal",
"children": [
{
"name": "Reptile",
"value": 1
},
{
"name": "Mollusca",
"value": 1
},
{
"name": "Amphibian",
"value": 1
},
{
"name": "Mammal",
"children": [
{
"name": "Horse",
"children": [
{
"name": "RaceHorse",
"value": 1
}
]
},
{
"name": "Cat",
"value": 1
},
{
"name": "Dog",
"value": 1
}
]
},
{
"name": "Insect",
"value": 1
},
{
"name": "Bird",
"value": 1
},
{
"name": "Arachnid",
"value": 1
},
{
"name": "Crustacean",
"value": 1
},
{
"name": "Fish",
"value": 1
}
]
}
]
},
{
"name": "Bacteria",
"value": 1
},
{
"name": "Archaea",
"value": 1
}
]
},
{
"name": "Blazon",
"value": 1
},
{
"name": "Statistic",
"value": 1
},
{
"name": "GrossDomesticProductPerCapita",
"value": 1
},
{
"name": "Altitude",
"value": 1
},
{
"name": "TopicalConcept",
"children": [
{
"name": "SystemOfLaw",
"value": 1
},
{
"name": "Tax",
"value": 1
},
{
"name": "Ideology",
"value": 1
},
{
"name": "Type",
"children": [
{
"name": "GovernmentType",
"value": 1
},
{
"name": "DocumentType",
"value": 1
}
]
},
{
"name": "ScientificConcept",
"value": 1
},
{
"name": "AcademicSubject",
"value": 1
},
{
"name": "Standard",
"value": 1
},
{
"name": "TheologicalConcept",
"children": [
{
"name": "ChristianDoctrine",
"value": 1
}
]
},
{
"name": "Taxon",
"value": 1
},
{
"name": "Fashion",
"value": 1
},
{
"name": "Genre",
"children": [
{
"name": "LiteraryGenre",
"value": 1
},
{
"name": "MovieGenre",
"value": 1
},
{
"name": "ArtisticGenre",
"value": 1
},
{
"name": "MusicGenre",
"value": 1
}
]
},
{
"name": "MathematicalConcept",
"value": 1
},
{
"name": "CardinalDirection",
"value": 1
},
{
"name": "PoliticalConcept",
"value": 1
},
{
"name": "PhilosophicalConcept",
"value": 1
}
]
},
{
"name": "Activity",
"children": [
{
"name": "Game",
"children": [
{
"name": "BoardGame",
"value": 1
},
{
"name": "CardGame",
"value": 1
}
]
},
{
"name": "Sport",
"children": [
{
"name": "HorseRiding",
"value": 1
},
{
"name": "Boxing",
"children": [
{
"name": "BoxingCategory",
"value": 1
},
{
"name": "BoxingStyle",
"value": 1
}
]
},
{
"name": "TeamSport",
"children": [
{
"name": "Soccer",
"value": 1
}
]
},
{
"name": "Athletics",
"value": 1
}
]
},
{
"name": "Sales",
"value": 1
}
]
},
{
"name": "HumanDevelopmentIndex",
"value": 1
},
{
"name": "Population",
"value": 1
},
{
"name": "EthnicGroup",
"value": 1
},
{
"name": "Colour",
"value": 1
}
]
}
#!/usr/bin/env python
import http, json, base64
from urllib.request import Request, urlopen
from urllib.parse import urlencode
from urllib.error import HTTPError
from time import time
class PySparql():
def __init__(this, endpoint, username=None, password=None, buffer_size=10000):
this.buffer_size = buffer_size
this.endpoint = endpoint
this.username = username
this.password = password
this.param = {}
def query(this, query, graph=""):
t0 = time()
res = this._query_all(query, graph)
dt = time() - t0
dt_str = "%f" % dt
return res
def _query_all(this, query, graph):
results = []
i = 0
while(True):
offset = i * this.buffer_size
part = this._query_buffer("{} OFFSET {} LIMIT {}".format(query, offset, this.buffer_size), graph)
results += part
if len(part) < this.buffer_size:
break
i += 1
return results
def _query_buffer(this, query, graph):
this.param["default-graph-uri"] = graph
this.param["query"] = query.encode('utf-8')
try:
headers = {'Accept': 'application/json'}
if this.username is not None and this.password is not None:
headers['Authorization'] = "Basic {}".format(base64.b64encode("{}:{}".format(this.username, this.password)))
req = Request(this.endpoint + "?" + urlencode(this.param), None, headers)
resp = urlopen(req)
j = resp.read()
resp.close()
return json.loads(j)['results']['bindings']
except (HTTPError, http.client.BadStatusLine) as error:
print(error)
return []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment