{"id":18377075,"url":"https://github.com/bbc/rdfsim","last_synced_at":"2025-04-06T20:32:13.598Z","repository":{"id":1921839,"uuid":"2849846","full_name":"bbc/rdfsim","owner":"bbc","description":"Large RDF hierarchies as vector spaces","archived":false,"fork":false,"pushed_at":"2014-06-27T08:59:50.000Z","size":166,"stargazers_count":20,"open_issues_count":0,"forks_count":11,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-04-08T21:02:54.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-25T13:38:23.000Z","updated_at":"2024-04-08T21:02:54.224Z","dependencies_parsed_at":"2022-08-06T11:15:56.502Z","dependency_job_id":null,"html_url":"https://github.com/bbc/rdfsim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Frdfsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Frdfsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Frdfsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Frdfsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc","download_url":"https://codeload.github.com/bbc/rdfsim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223263858,"owners_count":17115995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T00:26:05.917Z","updated_at":"2024-11-06T00:26:06.595Z","avatar_url":"https://github.com/bbc.png","language":"Python","readme":"RDFSim\n======\n\nThis Python library helps generating a vector space from very large hierarchies encoded in RDF. An obvious example application is to generate a vector space from a SKOS hierarchy or an RDFS subclass hierarchy.\n\nGetting started\n---------------\n\nRunning the tests:\n\n    $ nosetests\n\nInstalling:\n \n    $ python setup.py install\n\nExample use\n-----------\n\n    $ wget http://downloads.dbpedia.org/3.7/en/skos_categories_en.nt.bz2\n    $ bunzip2 skos_categories_en.nt.bz2\n    $ python\n    \u003e\u003e\u003e from rdfsim.space import Space\n    \u003e\u003e\u003e space = Space('skos_categories_en.nt')\n    \u003e\u003e\u003e space.similarity_uri(category1, category2)\n\nConstructing a vector space for the entire DBpedia SKOS category\nhierarchy (3M triples) takes a couple of minutes on a commodity laptop, \nand has a memory footprint of about 500M.\n\nAlternatively, a subset of it is available in the examples/ directory.\n\nHow it works\n------------\n\nFor each topic t in the hierarchy, we consider the set of its parents\nparents(t, k) at a level k. We construct a vector for each t in a space\nwhere each dimension corresponds to a topic d in the hierarchy. The value\nof t on dimension d is defined as follows:\n\n    t_d = \\sum_{k = 0}^{max_depth} \\sum_{d \\in parents(t, k)} decay^k\n\nwhere max_depth and decay are two parameters, which can be used to influence\nhow much importance we attach to ancestors that are high in the\ncategory hierarchy.\n\nThey can be specified as follows:\n\n    \u003e\u003e\u003e Space.max_depth = 8\n    \u003e\u003e\u003e Space.decay = 0.9\n\nLicensing terms and authorship\n------------------------------\n\nSee 'COPYING' and 'AUTHORS' files.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Frdfsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc%2Frdfsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Frdfsim/lists"}