-
Notifications
You must be signed in to change notification settings - Fork 356
URI hierarchy
Nodes in ConceptNet have URIs. A URI should tell you:
- what kind of object you're looking at
- important defining properties of it, such as its language or its text ("name")
- (if you prepend a server name) what URL to go to to get information about it, when we put up our API
For example, one concept URI is /concept/en/coffee
. The type is "concept". The type defines that the parts that come next are the language (en
) and the concept name (concept
).
The internal encoding is UTF-8 with spaces changed to underscores. We don't URI-encode things on this end (such as changing apostrophes to %27
), though someone accessing our API will have to do that.
When a URI needs to contain a list of components, these components are encoded as JSON. For example, a conjunction might have a list of conjuncts, containing /source/contributor/omcs/rspeer
and /source/activity/commons2-question
. The resulting URI is:
/conjunction/["/source/contributor/omcs/rspeer","/source/activity/commons2-question"]
/
: the root object, possibly the starting point for spreading confidence and for garbage collection
- Assertions are specified by several concepts (the first of which acts as a relation) in a JSON list.
- Examples:
/assertion/["/relation/IsA","/concept/en/dog","/concept/en/animal"]
/assertion/["/relation/UsedFor","/concept/zh_TW/枕頭","/concept/zh_TW/睡覺"]
Specified by a language and a name.
-
/concept/en
: English concepts-
/concept/en/coffee
(for example): the concept "coffee" in English -
/concept/en/for
: the preposition "for", probably being used as a relation
-
-
/concept/zh_TW
: Traditional Chinese concepts as used in Taiwan
See below for how sources are specified. The sources in a conjunction are separated by /_
.
-
/conjunction/["/source/web/en.wiktionary.org","/source/rule/wiktionary_scraper"]
(for example): we read things from Wiktionary with a scraper
Specified by a name only.
-
/frame/{1}_is_used_for_{2}
(for example)
Specified by a name only.
-
/relation/UsedFor
(for example): the "used for" relation, across all languages
Specified by an arbitrary hierarchy, examples of which are shown here.
-
/source/contributor
: crowd-sourced contributors.-
/source/contributor/omcs/bedume
: contributors from the OMCS database -
/source/contributor/petgame/3362
: contributors from the NTU pet game
-
-
/source/web
: Web sites-
/source/web/en.wiktionary.org
: a Web site, considered as a whole
-
-
/source/activity
: an interface used by contributors/source/activity/analogyspace
-
/source/rule
: a derivation rule, ideally packaged with the code/source/rule/wiktionary_scraper
Starting points
Reproducibility
Details