HTTP API
This page describes how you can query BabelNet through an HTTP
interface that returns JSON. You can append the
key
parameter to the HTTP requests as shown in the examples below. To
obtain an API key please read the key & limits page. All requests must be executed
using the
GET
method and they should include the
Accept-Encoding: gzip
header in order to obtain compressed content.
LICENSES: All the data of the external resources are
released under the terms of the respective owners' licenses.
Retrieve BabelNet version
- URL:
https://babelnet.io/v9/getVersion?key={key}
- Example: https://babelnet.io/v9/getVersion?key=<your_key>
Parameters
Name | Type | Description |
---|---|---|
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits) |
Response example
{
"version": "V5_3"
}
Retrieve the IDs of the Babel synsets (concepts) denoted by a given word
- URL:
https://babelnet.io/v9/getSynsetIds?lemma={lemma}&searchLang={searchLang}&key={key}
- Example: https://babelnet.io/v9/getSynsetIds?lemma=apple&searchLang=EN&key=<your_key>
Parameters
Name | Type | Description |
---|---|---|
lemma | string | Required. The word you want to search for |
searchLang | Language |
Required. The language of the word. Accepts multiple values. Example https://babelnet.io/v9/getSynsetIds?lemma=apple&searchLang=EN&searchLang=IT&pos=NOUN&key=<your_key> |
targetLang | Language |
The languages in which the data are to be retrieved. Default value is the search language and accepts not more than 3 languages except the search language. |
pos | UniversalPOS |
Returns only the synsets containing this part of speech (NOUN, VERB, etc). Accepts multiple values. Example https://babelnet.io/v9/getSynsetIds?lemma=plan&searchLang=EN&pos=NOUN&pos=VERB&key=<your_key> |
source | Source |
Returns only the synsets containing these sources (WIKT, WIKIDATA, etc). Accepts multiple values. |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
Response example
[
{
"id": "bn:00289737n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:26774334v",
"pos": "VERB",
"source": "BABELNET"
},
{
"id": "bn:26558969n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00005054n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00005076n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00615676n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00319426n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03174949n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03740610n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00353687n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:14289548n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03176270n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03739345n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:23848255n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00005055n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00955003n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:16695930n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:14128513n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:26774335v",
"pos": "VERB",
"source": "BABELNET"
},
{
"id": "bn:26326418n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03686542n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03283215n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:01132880n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:22068804n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:03345384n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:02506104n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:01783257n",
"pos": "NOUN",
"source": "BABELNET"
},
{
"id": "bn:00512973n",
"pos": "NOUN",
"source": "BABELNET"
}
]
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getSynsetIds' lemma = 'apple' lang = 'EN' key = 'KEY' params = { 'lemma' : lemma, 'searchLang' : lang, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) for result in data: print result['id']
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getSynsetIds?") params = { :lemma => 'apple', :searchLang => 'EN', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) json.each do |entry| puts entry['id'] end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"><script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getSynsetIds'; var lemma = 'apple' var lang = 'EN' var key = 'KEY' var params = { 'lemma': lemma, 'searchLang': lang, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response, function(key, val) { $('<div>', {text:val['id']}).appendTo(document.body); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getSynsetIds'; $lemma = 'apple'; $lang = 'EN'; $key = 'KEY'; $params = array( 'lemma' => $lemma, 'searchLang' => $lang, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); foreach($response as $result) { echo $result['id'] . '<br/>'; } ?> </body> </html>
Retrieve the information of a given synset
- URL:
https://babelnet.io/v9/getSynset?id={synsetId}&key={key}
- Example: https://babelnet.io/v9/getSynset?id=bn:14792761n&key=<your_key>
Parameters
Name | Type | Description |
---|---|---|
id | string |
Required. id of the synset you want to retrieve (can also be a WordNet id "wn:") |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
targetLang | Language |
The languages in which the data are to be retrieved. Default value is the English and accepts not more than 3 languages except the default language. Example https://babelnet.io/v9/getSynset?id=bn:14792761n&targetLang=IT&key=<your_key> |
Response example
{
"senses": [
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple-designed_processors",
"simpleLemma": "apple-designed_processors",
"lemma": {
"lemma": "Apple-designed_processors",
"type": "HIGH_QUALITY"
},
"source": "WIKI",
"senseKey": "32327247",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 123090446,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Ax",
"simpleLemma": "apple_ax",
"lemma": {
"lemma": "Apple_Ax",
"type": "HIGH_QUALITY"
},
"source": "WIKIDATA",
"senseKey": "Q97362379",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 388832871,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Silicon",
"simpleLemma": "apple_silicon",
"lemma": {
"lemma": "Apple_Silicon",
"type": "HIGH_QUALITY"
},
"source": "WIKIDATA",
"senseKey": "Q406283",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 368613751,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple-designed_processors",
"simpleLemma": "apple-designed_processors",
"lemma": {
"lemma": "Apple-designed_processors",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIDATA_ALIAS",
"senseKey": "Q406283",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 368613745,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Ax_series,_A_series",
"simpleLemma": "apple_ax_series,_a_series",
"lemma": {
"lemma": "Apple_Ax_series,_A_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIDATA_ALIAS",
"senseKey": "Q97362379",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 388832861,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_System_on_Chips",
"simpleLemma": "apple_system_on_chips",
"lemma": {
"lemma": "Apple_System_on_Chips",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIDATA_ALIAS",
"senseKey": "Q406283",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 368613746,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_(system_on_chip)",
"simpleLemma": "apple",
"lemma": {
"lemma": "Apple",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "41339485",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": [
"/ˈæ.pəl/"
]
},
"bKeySense": false,
"idSense": 124297211,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_a",
"simpleLemma": "apple_a",
"lemma": {
"lemma": "Apple_a",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37097202",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 124401249,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_A_series",
"simpleLemma": "apple_a_series",
"lemma": {
"lemma": "Apple_A_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56592099",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 279423564,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Ax",
"simpleLemma": "apple_ax",
"lemma": {
"lemma": "Apple_Ax",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37195889",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 122309949,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Ax_(System_on_Chip)",
"simpleLemma": "apple_ax",
"lemma": {
"lemma": "Apple_Ax",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "33306895",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 123780870,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_designed_processors",
"simpleLemma": "apple_designed_processors",
"lemma": {
"lemma": "Apple_designed_processors",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "64393009",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 348349116,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Firestorm",
"simpleLemma": "apple_firestorm",
"lemma": {
"lemma": "Apple_Firestorm",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "65889127",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 531017185,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_H1",
"simpleLemma": "apple_h1",
"lemma": {
"lemma": "Apple_H1",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "60282221",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 298135437,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_H_series",
"simpleLemma": "apple_h_series",
"lemma": {
"lemma": "Apple_H_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "60289099",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 298135438,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Icestorm",
"simpleLemma": "apple_icestorm",
"lemma": {
"lemma": "Apple_Icestorm",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "65889128",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 531017184,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_M_series",
"simpleLemma": "apple_m_series",
"lemma": {
"lemma": "Apple_M_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "65815956",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 530409300,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_mobile_application_processors",
"simpleLemma": "apple_mobile_application_processors",
"lemma": {
"lemma": "Apple_mobile_application_processors",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56163196",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 270769675,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_S5",
"simpleLemma": "apple_s5",
"lemma": {
"lemma": "Apple_S5",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "62183919",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 320544139,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_S6",
"simpleLemma": "apple_s6",
"lemma": {
"lemma": "Apple_S6",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "65355815",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 359802429,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_S_series",
"simpleLemma": "apple_s_series",
"lemma": {
"lemma": "Apple_S_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56592101",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 279423563,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_Silicon",
"simpleLemma": "apple_silicon",
"lemma": {
"lemma": "Apple_Silicon",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "64664430",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 353322792,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_silicon",
"simpleLemma": "apple_silicon",
"lemma": {
"lemma": "Apple_silicon",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "64351102",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 348270602,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_System_on_a_Chip",
"simpleLemma": "apple_system_on_a_chip",
"lemma": {
"lemma": "Apple_System_on_a_Chip",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "38095173",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 123529285,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_system_on_a_chip",
"simpleLemma": "apple_system_on_a_chip",
"lemma": {
"lemma": "Apple_system_on_a_chip",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "48160976",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 124294075,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_System_on_Chips",
"simpleLemma": "apple_system_on_chips",
"lemma": {
"lemma": "Apple_System_on_Chips",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "39827565",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 123626836,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_system_on_chips",
"simpleLemma": "apple_system_on_chips",
"lemma": {
"lemma": "Apple_system_on_chips",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37827287",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 124126688,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_T2",
"simpleLemma": "apple_t2",
"lemma": {
"lemma": "Apple_T2",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56049249",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 270335107,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_T_series",
"simpleLemma": "apple_t_series",
"lemma": {
"lemma": "Apple_T_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56592102",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 279423562,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_U1",
"simpleLemma": "apple_u1",
"lemma": {
"lemma": "Apple_U1",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "62183908",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 320544138,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_U_series",
"simpleLemma": "apple_u_series",
"lemma": {
"lemma": "Apple_U_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "64350870",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 348270603,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_W3",
"simpleLemma": "apple_w3",
"lemma": {
"lemma": "Apple_W3",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "58586013",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 295255888,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Apple_W_series",
"simpleLemma": "apple_w_series",
"lemma": {
"lemma": "Apple_W_series",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "56592100",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 279423565,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "BridgeOS_1",
"simpleLemma": "bridgeos_1",
"lemma": {
"lemma": "BridgeOS_1",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "59249156",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 296556820,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "BridgeOS_2",
"simpleLemma": "bridgeos_2",
"lemma": {
"lemma": "BridgeOS_2",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "58586151",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 295255893,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "BridgeOS_2.0",
"simpleLemma": "bridgeos_2.0",
"lemma": {
"lemma": "BridgeOS_2.0",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "58586148",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 295255890,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "EOS_1",
"simpleLemma": "eos_1",
"lemma": {
"lemma": "EOS_1",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "58586141",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 295255889,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "List_of_Apple_system_on_a_chips",
"simpleLemma": "list_of_apple_system_on_a_chips",
"lemma": {
"lemma": "List_of_Apple_system_on_a_chips",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37287006",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 123592689,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "List_of_Apple_system_on_chips",
"simpleLemma": "list_of_apple_system_on_chips",
"lemma": {
"lemma": "List_of_Apple_system_on_chips",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37441728",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:14792761n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 122356978,
"tags": {}
}
}
],
"wnOffsets": [],
"glosses": [
{
"source": "WIKI",
"sourceSense": 123090446,
"language": "EN",
"gloss": "Apple-designed processors, marketed for the Macintosh as Apple Silicon, are system on a chip and system in a package processors designed by Apple Inc., mainly using the ARM architecture.",
"tokens": [
{
"start": 76,
"end": 91,
"id": {
"id": "bn:00123813n",
"pos": "NOUN",
"source": "BABELNET"
},
"word": "system on a chip"
},
{
"start": 15,
"end": 24,
"id": {
"id": "bn:00014395n",
"pos": "NOUN",
"source": "BABELNET"
},
"word": "processors"
},
{
"start": 117,
"end": 126,
"id": {
"id": "bn:00014395n",
"pos": "NOUN",
"source": "BABELNET"
},
"word": "processors"
},
{
"start": 140,
"end": 149,
"id": {
"id": "bn:03739345n",
"pos": "NOUN",
"source": "BABELNET"
},
"word": "Apple Inc."
},
{
"start": 169,
"end": 184,
"id": {
"id": "bn:03437029n",
"pos": "NOUN",
"source": "BABELNET"
},
"word": "ARM architecture"
}
]
},
{
"source": "WIKIDATA",
"sourceSense": 264582065,
"language": "EN",
"gloss": "Processor chips designed by Apple Inc. for use in their product portfolio.",
"tokens": []
}
],
"examples": [],
"images": [
{
"name": "Apple_A4_Chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Apple_A4_Chip.jpg/200px-Apple_A4_Chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/17/Apple_A4_Chip.jpg",
"badImage": false
},
{
"name": "Apple_A6_Chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Apple_A6_Chip.jpg/200px-Apple_A6_Chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/b/bd/Apple_A6_Chip.jpg",
"badImage": false
},
{
"name": "Apple_A5X_Chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Apple_A5X_Chip.jpg/200px-Apple_A5X_Chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/4/47/Apple_A5X_Chip.jpg",
"badImage": false
},
{
"name": "S5L8900.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/S5L8900.jpg/200px-S5L8900.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fe/S5L8900.jpg",
"badImage": false
},
{
"name": "Apple_A5_Chip.jpg#WIKI",
"languages": [
"NL",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Apple_A5_Chip.jpg/200px-Apple_A5_Chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/4/41/Apple_A5_Chip.jpg",
"badImage": false
},
{
"name": "S5L8922.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/S5L8922.jpg/200px-S5L8922.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fe/S5L8922.jpg",
"badImage": false
},
{
"name": "S5L8720.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/S5L8720.jpg/200px-S5L8720.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/e5/S5L8720.jpg",
"badImage": false
},
{
"name": "Apple-A5-APL2498.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Apple-A5-APL2498.jpg/200px-Apple-A5-APL2498.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/15/Apple-A5-APL2498.jpg",
"badImage": false
},
{
"name": "Apple_A7_chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"DE",
"HU",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Apple_A7_chip.jpg/200px-Apple_A7_chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/7f/Apple_A7_chip.jpg",
"badImage": false
},
{
"name": "Apple_A6X_chip.jpg#WIKI",
"languages": [
"NL",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Apple_A6X_chip.jpg/200px-Apple_A6X_chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/23/Apple_A6X_chip.jpg",
"badImage": false
},
{
"name": "Apple_A8X_system-on-a-chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"HU",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Apple_A8X_system-on-a-chip.jpg/200px-Apple_A8X_system-on-a-chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/72/Apple_A8X_system-on-a-chip.jpg",
"badImage": false
},
{
"name": "Apple_A10_Fusion_APL1W24.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"HU",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Apple_A10_Fusion_APL1W24.jpg/200px-Apple_A10_Fusion_APL1W24.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/2e/Apple_A10_Fusion_APL1W24.jpg",
"badImage": false
},
{
"name": "S5L8920.jpg#WIKI",
"languages": [
"NL",
"VI",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO",
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/S5L8920.jpg/200px-S5L8920.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/7b/S5L8920.jpg",
"badImage": false
},
{
"name": "Apple_A8_system-on-a-chip.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"HU",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Apple_A8_system-on-a-chip.jpg/200px-Apple_A8_system-on-a-chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Apple_A8_system-on-a-chip.jpg",
"badImage": false
},
{
"name": "Apple_A9X.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"HU",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Apple_A9X.jpg/200px-Apple_A9X.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/e6/Apple_A9X.jpg",
"badImage": false
},
{
"name": "Apple_A10X_Fusion.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Apple_A10X_Fusion.jpg/200px-Apple_A10X_Fusion.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/4/4c/Apple_A10X_Fusion.jpg",
"badImage": false
},
{
"name": "Apple_logo_black.svg#WIKI",
"languages": [
"NL",
"VI",
"TH",
"ZH",
"JA",
"FA",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg",
"badImage": false
},
{
"name": "Apple_A11.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Apple_A11.jpg/200px-Apple_A11.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/6/6f/Apple_A11.jpg",
"badImage": false
},
{
"name": "Apple-A5-APL7498.jpg#WIKI",
"languages": [
"NL",
"FR",
"ES",
"DE",
"HU",
"FA",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Apple-A5-APL7498.jpg/200px-Apple-A5-APL7498.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/73/Apple-A5-APL7498.jpg",
"badImage": false
},
{
"name": "Apple_A9_APL0898.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"HU",
"EN",
"KO",
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Apple_A9_APL0898.jpg/200px-Apple_A9_APL0898.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/e6/Apple_A9_APL0898.jpg",
"badImage": false
},
{
"name": "Apple_A12.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"ES",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Apple_A12.jpg/200px-Apple_A12.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/2c/Apple_A12.jpg",
"badImage": false
},
{
"name": "Apple_A7_S5L9865_chip.jpg#WIKI",
"languages": [
"NL",
"FR",
"ES",
"DE",
"HU",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Apple_A7_S5L9865_chip.jpg/200px-Apple_A7_S5L9865_chip.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/ad/Apple_A7_S5L9865_chip.jpg",
"badImage": false
},
{
"name": "Apple_A9_APL1022.jpg#WIKI",
"languages": [
"NL",
"FR",
"ES",
"HU",
"EN",
"KO",
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Apple_A9_APL1022.jpg/200px-Apple_A9_APL1022.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Apple_A9_APL1022.jpg",
"badImage": false
},
{
"name": "Apple_A12X.jpg#WIKI",
"languages": [
"NL",
"VI",
"FR",
"EN",
"KO",
"IT",
"RU"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Apple_A12X.jpg/200px-Apple_A12X.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/d/df/Apple_A12X.jpg",
"badImage": false
},
{
"name": "Apple_S1_module.png#WIKI",
"languages": [
"VI",
"FR",
"ES",
"HU",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Apple_S1_module.png/200px-Apple_S1_module.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/Apple_S1_module.png",
"badImage": false
},
{
"name": "Apple_T2_APL1027.jpg#WIKI",
"languages": [
"VI",
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Apple_T2_APL1027.jpg/200px-Apple_T2_APL1027.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_T2_APL1027.jpg",
"badImage": false
},
{
"name": "Apple_S1P_module.png#WIKI",
"languages": [
"VI",
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Apple_S1P_module.png/200px-Apple_S1P_module.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Apple_S1P_module.png",
"badImage": false
},
{
"name": "Apple_S3_module.png#WIKI",
"languages": [
"VI",
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Apple_S3_module.png/200px-Apple_S3_module.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/b/b7/Apple_S3_module.png",
"badImage": false
},
{
"name": "Apple_S2_module.png#WIKI",
"languages": [
"VI",
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Apple_S2_module.png/200px-Apple_S2_module.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/0/03/Apple_S2_module.png",
"badImage": false
},
{
"name": "Apple_T1_APL1023.jpg#WIKI",
"languages": [
"VI",
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Apple_T1_APL1023.jpg/200px-Apple_T1_APL1023.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/f3/Apple_T1_APL1023.jpg",
"badImage": false
},
{
"name": "Apple_S4_module.png#WIKI",
"languages": [
"VI",
"FR",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Apple_S4_module.png/200px-Apple_S4_module.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/b/b8/Apple_S4_module.png",
"badImage": false
},
{
"name": "Apple_W1_343S00130.jpg#WIKI",
"languages": [
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Apple_W1_343S00130.jpg/200px-Apple_W1_343S00130.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/e4/Apple_W1_343S00130.jpg",
"badImage": false
},
{
"name": "Apple-W2-338S00348.jpg#WIKI",
"languages": [
"FR",
"ES",
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Apple-W2-338S00348.jpg/200px-Apple-W2-338S00348.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/0/0f/Apple-W2-338S00348.jpg",
"badImage": false
},
{
"name": "IPhone_4S_No_shadow.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/IPhone_4S_No_shadow.png/200px-IPhone_4S_No_shadow.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/d/d2/IPhone_4S_No_shadow.png",
"badImage": false
},
{
"name": "IPhone_5s.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/IPhone_5s.png/200px-IPhone_5s.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/5/5e/IPhone_5s.png",
"badImage": false
},
{
"name": "IPad_Air.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/IPad_Air.png/200px-IPad_Air.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/8/8d/IPad_Air.png",
"badImage": false
},
{
"name": "IPhone_5C_(blue).svg#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/9/97/IPhone_5C_%28blue%29.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/9/97/IPhone_5C_%28blue%29.svg",
"badImage": false
},
{
"name": "IPad_Pro_Mockup.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/IPad_Pro_Mockup.png/200px-IPad_Pro_Mockup.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/74/IPad_Pro_Mockup.png",
"badImage": false
},
{
"name": "IPadminiWhite.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/IPadminiWhite.png/200px-IPadminiWhite.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/4/43/IPadminiWhite.png",
"badImage": false
},
{
"name": "IPhone_5.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/IPhone_5.png/200px-IPhone_5.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/fa/IPhone_5.png",
"badImage": false
},
{
"name": "IPad_Air_2.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/IPad_Air_2.png/200px-IPad_Air_2.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/3/38/IPad_Air_2.png",
"badImage": false
},
{
"name": "IPhone6_silver_frontface.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/IPhone6_silver_frontface.png/200px-IPhone6_silver_frontface.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/0/01/IPhone6_silver_frontface.png",
"badImage": false
},
{
"name": "IPad_3.png#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/IPad_3.png/200px-IPad_3.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a4/IPad_3.png",
"badImage": false
},
{
"name": "Pink_iPod_touch_6th_generation.svg#WIKI",
"languages": [
"EN",
"KO"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/1/19/Pink_iPod_touch_6th_generation.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/19/Pink_iPod_touch_6th_generation.svg",
"badImage": false
},
{
"name": "IOS_wordmark_(2017).svg#WIKI",
"languages": [
"FA",
"IT"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/IOS_wordmark_%282017%29.svg/200px-IOS_wordmark_%282017%29.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/6/63/IOS_wordmark_%282017%29.svg",
"badImage": false
},
{
"name": "IPad_Mini_3_Gold.png#WIKI",
"languages": [
"EN"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/en/thumb/2/22/IPad_Mini_3_Gold.png/200px-IPad_Mini_3_Gold.png",
"url": "https://upload.wikimedia.org/wikipedia/en/2/22/IPad_Mini_3_Gold.png",
"badImage": false
},
{
"name": "IPhone_6S_Rose_Gold.png#WIKI",
"languages": [
"EN"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/IPhone_6S_Rose_Gold.png/200px-IPhone_6S_Rose_Gold.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a7/IPhone_6S_Rose_Gold.png",
"badImage": false
},
{
"name": "Samsung_S5L8930.jpg#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/7/7b/Samsung_S5L8930.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/7/7b/Samsung_S5L8930.jpg",
"badImage": false
},
{
"name": "Cyclone_e_net.jpg#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Cyclone_e_net.jpg/200px-Cyclone_e_net.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/6/61/Cyclone_e_net.jpg",
"badImage": false
},
{
"name": "Infuturo2.svg#WIKI",
"languages": [
"IT"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/it/f/ff/Infuturo2.svg",
"url": "https://upload.wikimedia.org/wikipedia/it/f/ff/Infuturo2.svg",
"badImage": false
},
{
"name": "Crystal_Clear_app_mymac_new.png#WIKI",
"languages": [
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/0/0b/Crystal_Clear_app_mymac_new.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/0/0b/Crystal_Clear_app_mymac_new.png",
"badImage": false
},
{
"name": "IPhone_X_vector.svg#WIKI",
"languages": [
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/32/IPhone_X_vector.svg/200px-IPhone_X_vector.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/3/32/IPhone_X_vector.svg",
"badImage": false
},
{
"name": "IPhone_6s_vector.svg#WIKI",
"languages": [
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/IPhone_6s_vector.svg/200px-IPhone_6s_vector.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/9/9b/IPhone_6s_vector.svg",
"badImage": false
},
{
"name": "Apple_Computer_Logo_rainbow.svg#WIKI",
"languages": [
"FR"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/8/84/Apple_Computer_Logo_rainbow.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/8/84/Apple_Computer_Logo_rainbow.svg",
"badImage": false
},
{
"name": "IPhone_8_vector.svg#WIKI",
"languages": [
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/IPhone_8_vector.svg/200px-IPhone_8_vector.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/5/5d/IPhone_8_vector.svg",
"badImage": false
},
{
"name": "Exquisite-Modem.png#WIKI",
"languages": [
"IT"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/c/cb/Exquisite-Modem.png",
"url": "https://upload.wikimedia.org/wikipedia/commons/c/cb/Exquisite-Modem.png",
"badImage": false
},
{
"name": "IPhone_XR_Blue.svg#WIKI",
"languages": [
"KO"
],
"urlSource": "WIKI",
"license": "OTHER",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/IPhone_XR_Blue.svg/200px-IPhone_XR_Blue.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/e9/IPhone_XR_Blue.svg",
"badImage": false
},
{
"name": "ARM-Cortex-A9.gif#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/ARM-Cortex-A9.gif/200px-ARM-Cortex-A9.gif",
"url": "https://upload.wikimedia.org/wikipedia/commons/3/3b/ARM-Cortex-A9.gif",
"badImage": false
},
{
"name": "AppleA9.jpg#WIKI",
"languages": [
"RU"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/AppleA9.jpg/200px-AppleA9.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a6/AppleA9.jpg",
"badImage": false
},
{
"name": "ARM-Cortex-A8.gif#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/ARM-Cortex-A8.gif/200px-ARM-Cortex-A8.gif",
"url": "https://upload.wikimedia.org/wikipedia/commons/f/f5/ARM-Cortex-A8.gif",
"badImage": false
},
{
"name": "Samsung_S5L8701.jpg#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Samsung_S5L8701.jpg/200px-Samsung_S5L8701.jpg",
"url": "https://upload.wikimedia.org/wikipedia/commons/9/98/Samsung_S5L8701.jpg",
"badImage": false
},
{
"name": "S5L8960-SoC-Apple-A6.JPG#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/S5L8960-SoC-Apple-A6.JPG/200px-S5L8960-SoC-Apple-A6.JPG",
"url": "https://upload.wikimedia.org/wikipedia/commons/1/19/S5L8960-SoC-Apple-A6.JPG",
"badImage": false
},
{
"name": "Apple_Swift_(Vermutung).JPG#WIKI",
"languages": [
"DE"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Apple_Swift_%28Vermutung%29.JPG/200px-Apple_Swift_%28Vermutung%29.JPG",
"url": "https://upload.wikimedia.org/wikipedia/commons/c/c4/Apple_Swift_%28Vermutung%29.JPG",
"badImage": false
},
{
"name": "Poznamka.svg#WIKI",
"languages": [
"NL"
],
"urlSource": "WIKI",
"license": "CC_BY_SA_30",
"thumbUrl": "https://upload.wikimedia.org/wikipedia/commons/0/02/Poznamka.svg",
"url": "https://upload.wikimedia.org/wikipedia/commons/0/02/Poznamka.svg",
"badImage": false
}
],
"synsetType": "CONCEPT",
"categories": [
{
"category": "ARM_architecture",
"language": "EN"
},
{
"category": "Apple_Inc._processors",
"language": "EN"
},
{
"category": "Articles_with_short_description",
"language": "EN"
},
{
"category": "Computer-related_introductions_in_2011",
"language": "EN"
},
{
"category": "2011_introductions",
"language": "EN"
},
{
"category": "System_on_a_chip",
"language": "EN"
},
{
"category": "Microprocessors",
"language": "EN"
}
],
"translations": {},
"domains": {
"COMPUTING": 0.40721815824508667
},
"lnToCompound": {},
"lnToOtherForm": {
"EN": [
"Ax"
]
},
"filterLangs": [
"EN"
],
"tags": [
"CONCEPT",
"COMPUTING",
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "ARM_architecture",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "Apple_Inc._processors",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "Articles_with_short_description",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "Computer-related_introductions_in_2011",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "2011_introductions",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "System_on_a_chip",
"language": "EN"
}
},
{
"CLASSNAME": "it.uniroma1.lcl.babelnet.data.BabelCategory",
"DATA": {
"category": "Microprocessors",
"language": "EN"
}
}
],
"bkeyConcepts": false
}
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getSynset' id = 'bn:14792761n' key = 'KEY' params = { 'id' : id, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) # retrieving BabelSense data senses = data['senses'] for result in senses: lemma = result.get('lemma') language = result.get('language') print language.encode('utf-8') + "\t" + str(lemma.encode('utf-8')) print '\n' # retrieving BabelGloss data glosses = data['glosses'] for result in glosses: gloss = result.get('gloss') language = result.get('language') print language.encode('utf-8') + "\t" + str(gloss.encode('utf-8')) print '\n' # retrieving BabelImage data images = data['images'] for result in images: url = result.get('url') language = result.get('language') name = result.get('name') print language.encode('utf-8') +"\t"+ str(name.encode('utf-8')) +"\t"+ str(url.encode('utf-8'))
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getSynset?") params = { :id => 'bn:14792761n', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) # retrieving BabelSense data json['senses'].each do |entry| lemma = entry['lemma'] language = entry['language'] puts language + "\t" + lemma end puts "\n" # retrieving BabelGloss data json['glosses'].each do |entry| gloss = entry['gloss'] language = entry['language'] puts language + "\t" + gloss end puts "\n" # retrieving BabelImage data json['images'].each do |entry| url = entry['url'] language = entry['language'] name = entry['name'] puts language + "\t" + name + "\t" + url end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getSynset'; var id = 'bn:14792761n' var key = 'KEY' var params = { 'id' : id, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response['senses'], function(key, val) { var entry = "Language: " + val['language'] + "<br/>Lemma: " + val['lemma'] + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); }); $.each(response['glosses'], function(key, val) { var entry = "Language: " + val['language'] + "<br/>Gloss: " + val['gloss'] + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); }); $.each(response['images'], function(key, val) { var entry = "Language: " + val['language'] + "<br/>Name: " + val['name'] + "<br/>Url: " + val['url'] + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getSynset'; $id = 'bn:14792761n'; $key = 'KEY'; $params = array( 'id' => $id, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); # retrieving BabelSense data foreach($response['senses'] as $result) { $lemma = $result['lemma']; $language = $result['language']; echo "Language: " . $language . "<br/>Lemma: " . $lemma . "<br/><br/>"; } # retrieving BabelGloss data foreach($response['glosses'] as $result) { $gloss = $result['gloss']; $language = $result['language']; echo "Language: " . $language . "<br/>Gloss: " . $gloss . "<br/><br/>"; } # retrieving BabelImage data foreach($response['images'] as $result) { $url = $result['url']; $language = $result['language']; $name = $result['name']; echo "Language: " . $language . "<br/>Name: " . $name . "<br/>Url: " . $url . "<br/><br/>"; } ?> </body> </html>
Retrieve the senses of a given word
- URL:
https://babelnet.io/v9/getSenses?lemma={lemma}&searchLang={lang}&key={key}
- Example: https://babelnet.io/v9/getSenses?lemma=BabelNet&searchLang=EN&key=<your_key>
Parameters
Name | Type | Description |
---|---|---|
lemma | string |
Required. The word you want to search for |
searchLang | Language |
Required. The language of the word |
targetLang | Language |
The languages in which the data are to be retrieved. Default value is the search language and accepts not more than 3 languages except the search language. Example https://babelnet.io/v9/getSenses?lemma=BabelNet&searchLang=EN&pos=VERB&targetLang=IT&key=<your_key> |
pos | UniversalPOS |
Returns only the synsets containing this part of speech (NOUN, VERB, etc). Accepts multiple values. Example https://babelnet.io/v9/getSenses?lemma=BabelNet&searchLang=EN&pos=VERB&key=<your_key> |
source | Source |
Returns only the synsets containing these sources (WIKT, WIKIDATA, etc). Accepts multiple values. |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
Response example
[
{
"type": "BabelSense",
"properties": {
"fullLemma": "BabelNet",
"simpleLemma": "babelnet",
"lemma": {
"lemma": "BabelNet",
"type": "HIGH_QUALITY"
},
"source": "WIKI",
"senseKey": "37291130",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 70973330,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "BabelNet",
"simpleLemma": "babelnet",
"lemma": {
"lemma": "BabelNet",
"type": "HIGH_QUALITY"
},
"source": "WIKIDATA",
"senseKey": "Q4837690",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 521355878,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "BabelNet",
"simpleLemma": "babelnet",
"lemma": {
"lemma": "BabelNet",
"type": "HIGH_QUALITY"
},
"source": "OMWIKI",
"senseKey": "1499705",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 70973352,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "babelnet.org",
"simpleLemma": "babelnet.org",
"lemma": {
"lemma": "babelnet.org",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIDATA_ALIAS",
"senseKey": "Q4837690",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 521355876,
"tags": {}
}
},
{
"type": "BabelSense",
"properties": {
"fullLemma": "Babelnet",
"simpleLemma": "babelnet",
"lemma": {
"lemma": "Babelnet",
"type": "POTENTIAL_NEAR_SYNONYM_OR_WORSE"
},
"source": "WIKIRED",
"senseKey": "37291418",
"frequency": 0,
"language": "EN",
"pos": "NOUN",
"synsetID": {
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
},
"translationInfo": "",
"pronunciations": {
"audios": [],
"transcriptions": []
},
"bKeySense": false,
"idSense": 70973337,
"tags": {}
}
}
]
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getSenses' lemma = 'BabelNet' lang = 'EN' key = 'KEY' params = { 'lemma' : lemma, 'searchLang' : lang, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) # retrieving BabelSense data for result in data: lemma = result.get('lemma') language = result.get('language') source = result.get('source') print language.encode('utf-8') \ +"\t"+ str(lemma.encode('utf-8')) \ +"\t"+ str(source.encode('utf-8'))
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getSenses?") params = { :lemma => 'BabelNet', :searchLang => 'EN', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) json.each do |entry| lemma = entry['lemma'] language = entry['language'] source = entry['source'] puts language +"\t"+ lemma +"\t"+ source end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getSenses'; var lemma = 'BabelNet' var lang = 'EN' var key = 'KEY' var params = { 'lemma': lemma, 'searchLang': lang, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response, function(key, val) { var entry = "Language: " + val['language'] + "<br/>Lemma: " + val['lemma'] + "<br/>Source: " + val['source'] + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getSenses'; $lemma = 'BabelNet'; $lang = 'EN'; $key = 'KEY'; $params = array( 'lemma' => $lemma, 'searchLang' => $lang, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); foreach($response as $result) { $lemma = $result['lemma']; $language = $result['language']; $source = $result['source']; echo "Language: " . $language . "<br/>Lemma: " . $lemma . "<br/>Source: " . $source . "<br/><br/>"; } ?> </body> </html>
Retrieve a list of BabelNet IDs given a resource identifier
- URL:
https://babelnet.io/v9/getSynsetIdsFromResourceID?id={lemma}&searchLang={searchLang}&pos={pos}&source={source}&key={key}
- Example: https://babelnet.io/v9/getSynsetIdsFromResourceID?id=BabelNet&searchLang=EN&pos=NOUN&source=WIKI&key=<your_key>
Parameters
This method must be accessed differently according to the resource identifier that is being used. For resources that have a unique identifier for each item (e.g. Wikidata) the only required parameter is the id; this holds for all the resources except Wikipedia and Wikiquote, where a single page title is not unique across different languages: this is why when using a Wikipedia ID (i.e., page title) it is mandatory to include the search language and, optionally, the POS tag. Both calls have other mandatory parameters (source and API key), explained in the tables below.
Parameters for Wikipedia and Wikiquote.
Name | Type | Description |
---|---|---|
id | string |
Required. The page title you want to search for |
searchLang | Language |
The language of the word |
targetLang | Language |
The languages in which the data are to be retrieved. Default value is the search language and accepts not more than 3 languages except the search language. |
pos | UniversalPOS |
Returns only the synsets containing this part of speech (NOUN, VERB, etc). Accepts multiple values. |
source | Source |
Required. The resource of the page title specified. Accepts only the values WIKI or WIKIQU. |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
Parameters for the all remaining resources.
Name | Type | Description |
---|---|---|
id | string |
Required. id of the synset you want to retrieve (bn:03083790n, Q4837690, etc.) |
targetLang | Language |
The languages in which the data are to be retrieved. Default value is the English and accepts not more than 3 languages except the default language. |
source | Source |
Required. The resource of the identifier specified. Accepts all the resource values except WIKI and WIKIQU. |
wnVersion | string |
If the value of the parameter source is WN (WordNet), using this field allow to specify the WordNet version of the parameter id. |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
Response example
[
{
"id": "bn:03083790n",
"pos": "NOUN",
"source": "BABELNET"
}
]
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getSynsetIdsFromResourceID' id = 'BabelNet' lang = 'EN' pos = 'NOUN' source = 'WIKI' key = 'KEY' params = { 'id' : id, 'searchLang' : lang, 'pos' : pos, 'source' : source, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) for result in data: print result['id']
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getSynsetIdsFromResourceID?") params = { :id => 'BabelNet', :searchLang => 'EN', :pos => 'NOUN', :source => 'WIKI', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) json.each do |entry| puts entry['id'] end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getSynsetIdsFromResourceID'; var id = 'BabelNet' var lang = 'EN' var pos = 'NOUN' var source = 'WIKI' var key = 'KEY' var params = { 'id' : id, 'searchLang' : lang, 'pos' : pos, 'source' : source, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response, function(key, val) { $('<div>', {text:val['id']}).appendTo(document.body); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getSynsetIdsFromResourceID'; $id = 'BabelNet'; $lang = 'EN'; $pos = 'NOUN'; $source = 'WIKI'; $key = 'KEY'; $params = array( 'lemma' => $lemma, 'searchLang' => $lang, 'pos' => $pos, 'source' => $source, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); foreach($response as $result) { echo $result['id'] . '<br/>'; } ?> </body> </html>
Retrieve edges of a given BabelNet synset
- URL:
https://babelnet.io/v9/getOutgoingEdges?id={synsetId}&key={key}
- Example: https://babelnet.io/v9/getOutgoingEdges?id=bn:03083790n&key=<your_key>
Parameters
Name | Type | Description |
---|---|---|
id | string |
Required. id of the synset you want to retrieve |
key | string |
Required. API key obtained after signing up to BabelNet (see key & limits ) |
Response example
[
{
"language": "MUL",
"pointer": {
"fSymbol": "wdp31",
"name": "instance_of",
"shortName": "instance_of",
"relationGroup": "HYPERNYM",
"isAutomatic": false
},
"target": "bn:00021497n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "MUL",
"pointer": {
"fSymbol": "wdp31",
"name": "instance_of",
"shortName": "instance_of",
"relationGroup": "HYPERNYM",
"isAutomatic": false
},
"target": "bn:00047172n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "MUL",
"pointer": {
"fSymbol": "wdp31",
"name": "instance_of",
"shortName": "instance_of",
"relationGroup": "HYPERNYM",
"isAutomatic": false
},
"target": "bn:00059033n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "MUL",
"pointer": {
"fSymbol": "wdp31",
"name": "instance_of",
"shortName": "instance_of",
"relationGroup": "HYPERNYM",
"isAutomatic": false
},
"target": "bn:02275757n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "MUL",
"pointer": {
"fSymbol": "wdp31",
"name": "instance_of",
"shortName": "instance_of",
"relationGroup": "HYPERNYM",
"isAutomatic": false
},
"target": "bn:02290297n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "@w",
"name": "Hypernym",
"shortName": "is-a",
"relationGroup": "HYPERNYM",
"isAutomatic": true
},
"target": "bn:02275757n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00000657n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00004785n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00020452n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00021547n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00025928n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00026967n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00030862n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00031339n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00044458n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00049910n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00050161n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00050901n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00054468n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00059033n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00059123n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00064421n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00075735n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00081546n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00240337n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00356605n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00370400n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00683882n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00685308n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00790971n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00987447n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01391386n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01669841n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01801234n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01925466n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02202384n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02275757n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02290297n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02440726n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02514363n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02637743n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02886551n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03217333n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03313533n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03335263n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03335629n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03387875n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03388996n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03488806n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03683294n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:10083342n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:15173814n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:16845612n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:16847651n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:17317913n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:17388870n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:17643841n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:17738885n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:23635940n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "EN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:26907216n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "AF",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00045156n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "AF",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00047172n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "AF",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03288118n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "AF",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03814713n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "BN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00024746n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "BN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00073092n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "BN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03159815n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "BN",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:20277502n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "CA",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00079080n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "CA",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03164081n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "CA",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:15133936n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00003266n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00025333n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00029344n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00050906n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00052570n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00777246n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "FR",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:06797405n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "IT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00046139n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "IT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00597954n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "IT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00800146n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "IT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01009911n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "IT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:02612327n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "PT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03688518n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "PT",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:10842586n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00015605n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:00028143n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:01178863n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:03869203n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:05270372n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:14788478n",
"weight": 0.0,
"normalizedWeight": 0.0
},
{
"language": "ES",
"pointer": {
"fSymbol": "r",
"name": "Semantically related form",
"shortName": "related",
"relationGroup": "OTHER",
"isAutomatic": false
},
"target": "bn:16241759n",
"weight": 0.0,
"normalizedWeight": 0.0
}
]
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getOutgoingEdges' id = 'bn:03083790n' key = 'KEY' params = { 'id' : id, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) # retrieving Edges data for result in data: target = result.get('target') language = result.get('language') # retrieving BabelPointer data pointer = result['pointer'] relation = pointer.get('name') group = pointer.get('relationGroup') print language.encode('utf-8') \ + "\t" + str(target.encode('utf-8')) \ + "\t" + str(relation.encode('utf-8')) \ + "\t" + str(group.encode('utf-8'))
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getOutgoingEdges?") params = { :id => 'bn:14792761n', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) # retrieving Edges data json.each do |entry| target = entry['target'] language = entry['language'] # retrieving BabelPointer data pointer = entry['pointer'] relation = pointer['name'] group = pointer['relationGroup'] puts language + "\t" + target + "\t" + relation + "\t" + group end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getOutgoingEdges'; var id = 'bn:14792761n' var key = 'KEY' var params = { 'id': id, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response, function(key, val) { var pointer = val['pointer']; var entry = "Language: " + val['language'] + "<br/>Target: " + val['target'] + "<br/>Relation: " + pointer['name'] + "<br/>Relation group: " + pointer['relationGroup'] + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getOutgoingEdges'; $id = 'bn:03083790n'; $key = 'KEY'; $params = array( 'id' => $id, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); # retrieving edges data foreach($response as $result) { $target = $result['target']; $language = $result['language']; $pointer = $result['pointer']; $relation = $pointer['name']; $group = $pointer['relationGroup']; echo "Language: " . $language . "<br/>Target: " . $target . "<br/>Relation: " . $relation . "<br/>Relation group: " . $group . "<br/><br/>"; } ?> </body> </html>
Retrieve hypernyms, hyponyms and antonyms of a given BabelNet synset
Code samples
import urllib2 import urllib import json import gzip from StringIO import StringIO service_url = 'https://babelnet.io/v9/getOutgoingEdges' id = 'bn:00007287n' key = 'KEY' params = { 'id' : id, 'key' : key } url = service_url + '?' + urllib.urlencode(params) request = urllib2.Request(url) request.add_header('Accept-encoding', 'gzip') response = urllib2.urlopen(request) if response.info().get('Content-Encoding') == 'gzip': buf = StringIO( response.read()) f = gzip.GzipFile(fileobj=buf) data = json.loads(f.read()) # retrieving Edges data for result in data: target = result.get('target') language = result.get('language') # retrieving BabelPointer data pointer = result['pointer'] relation = pointer.get('name') group = pointer.get('relationGroup') # Types of relationGroup: HYPERNYM, HYPONYM, MERONYM, HOLONYM, OTHER if ('hypernym' in group.lower() or 'hyponym' in group.lower()): print (str(language) + "\t" + str(target) + "\t" + str(relation) + "\t" + str(group)) elif ('antonym' in relation.lower()): print (str(language) + "\t" + str(target) + "\t" + str(relation) + "\t" + str(group))
require "net/http" require 'json' uri = URI("https://babelnet.io/v9/getOutgoingEdges?") params = { :id => 'bn:00007287n', :key => 'KEY' } uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true response = http.request(Net::HTTP::Get.new(uri.request_uri)) if response.is_a?(Net::HTTPSuccess) json = JSON.parse(response.body) # retrieving Edges data json.each do |entry| target = entry['target'] language = entry['language'] # retrieving BabelPointer data pointer = entry['pointer'] relation = pointer['name'] group = pointer['relationGroup'] # Types of relationGroup: HYPERNYM, HYPONYM, MERONYM, HOLONYM, OTHER if group.downcase.include? "hypernym" or group.downcase.include? "hyponym" puts language + "\t" + target + "\t" + relation + "\t" + group elsif relation.downcase.include? "antonym" puts language + "\t" + target + "\t" + relation + "\t" + group end end end
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <script> var service_url = 'https://babelnet.io/v9/getOutgoingEdges'; var id = 'bn:00007287n' var key = 'KEY' var params = { 'id': id, 'key' : key }; $.getJSON(service_url + "?", params, function(response) { $.each(response, function(key, val) { var pointer = val['pointer']; var relation = pointer['name']; var group = pointer['relationGroup']; # Types of relationGroup: HYPERNYM, HYPONYM, MERONYM, HOLONYM, OTHER if ((group.toLowerCase().indexOf("hypernym") > -1) || (group.toLowerCase().indexOf("hyponym") > -1) || (relation.toLowerCase().indexOf("antonym") > -1)) { var entry = "Language: " + val['language'] + "<br/>Target: " + val['target'] + "<br/>Relation: " + relation + "<br/>Relation group: " + group + "<br/><br/>"; $('<div>', {html:entry}).appendTo(document.body); } }); }); </script> </body> </html>
<!DOCTYPE html> <html> <body> <?php $service_url = 'https://babelnet.io/v9/getOutgoingEdges'; $id = 'bn:00007287n'; $key = 'KEY'; $params = array( 'id' => $id, 'key' => $key ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); $response = json_decode(curl_exec($ch), true); curl_close($ch); # retrieving edges data foreach($response as $result) { $target = $result['target']; $language = $result['language']; $pointer = $result['pointer']; $relation = $pointer['name']; $group = $pointer['relationGroup']; # Types of relationGroup: HYPERNYM, HYPONYM, MERONYM, HOLONYM, OTHER if ((strpos(strtolower($group), "hypernym") !== FALSE) || (strpos(strtolower($group), "hyponym") !== FALSE) || (strpos(strtolower($relation), "antonym") !== FALSE)) { echo "Language: " . $language . "<br/>Target: " . $target . "<br/>Relation: " . $relation . "<br/>Relation group: " . $group . "<br/><br/>"; } } ?> </body> </html>
HTTP request error
Below, an example of an error message returned after a wrong call:Response example
HTTP/1.1 400 Bad Request
Content-Length: 52
{"message":"Wrong parameters."}
Related Project
BabelNet.js - a wrapper for the BabelNet HTTP API to be used from the browser and from Node.js.
Usage
First, bundle all dependencies into one file with browserify. Make sure to create a .env file with your API key before. You can simply rename and modify the file .env.example from the repo.
$ npm run browserify
Second, you can use the created file in the browser as follows.
BabelNet.getSynsetIds({
word: 'apple',
language: 'EN'
}, function(err, results) {
if (err) {
throw(err);
}
console.log(JSON.stringify(results));
});
The API is modeled along the BabelNet HTTP API and offers the following methods:
getSynsetIds
getSynset
getSenses
getSynsetIdsFromWikipediaTitle
getEdges