A minimal client for entity-fishing service.
Project description
Python client to query the Entity Fishing service API developed in the context of the EU H2020 HIRMEOS project (WP3). For more information about entity-fishing, please check the Entity Fishing Documentation.
Installation
The client can be installed using pip:
pip install entity-fishing-client
Usage
from nerd import nerd
client = nerd.NerdClient()
client.disambiguate(
"Linux is a name that broadly denotes a family of free and open-source software operating systems (OS) built around the Linux kernel."
)
With the following example response:
(
{u'entities': [
{
u'domains': [u'Computer_Science'],
u'nerd_score': 0.3753,
u'nerd_selection_score': 0.7268,
u'offsetEnd': 5,
u'offsetStart': 0,
u'rawName': u'Linux',
u'type': u'PERSON',
u'wikidataId': u'Q388',
u'wikipediaExternalRef': 6097297
},
{
u'domains': [u'Computer_Science'],
u'nerd_score': 0.7442,
u'nerd_selection_score': 0.85,
u'offsetEnd': 78,
u'offsetStart': 49,
u'rawName': u'free and open-source software',
u'wikidataId': u'Q506883',
u'wikipediaExternalRef': 1721496
},
{
u'domains': [u'Electrotechnology', u'Electronics',
u'Computer_Science'],
u'nerd_score': 0.7442,
u'nerd_selection_score': 0.4487,
u'offsetEnd': 96,
u'offsetStart': 79,
u'rawName': u'operating systems',
u'wikidataId': u'Q9135',
u'wikipediaExternalRef': 22194
},
{
u'domains': [
u'Electrotechnology', u'Electronics', u'Computer_Science'
],
u'nerd_score': 0.7442,
u'nerd_selection_score': 0.4487,
u'offsetEnd': 100,
u'offsetStart': 98,
u'rawName': u'operating systems',
u'wikidataId': u'Q9135',
u'wikipediaExternalRef': 22194
},
{
u'domains': [u'Electronics', u'Computer_Science'],
u'nerd_score': 0.743,
u'nerd_selection_score': 0.8383,
u'offsetEnd': 131,
u'offsetStart': 119,
u'rawName': u'Linux kernel',
u'wikidataId': u'Q14579',
u'wikipediaExternalRef': 21347315
}
],
u'global_categories': [
{u'category': u'Finnish inventions',
u'page_id': 27421536,
u'source': u'wikipedia-en',
u'weight': 0.09684039970133569},
{u'category': u'Free software programmed in C',
u'page_id': 11241711,
u'source': u'wikipedia-en',
u'weight': 0.06433942787438053},
{u'category': u'Unix variants',
u'page_id': 10429397,
u'source': u'wikipedia-en',
u'weight': 0.09684039970133569},
{u'category': u'Operating systems',
u'page_id': 693664,
u'source': u'wikipedia-en',
u'weight': 0.12888888710813473},
{u'category': u'Free software',
u'page_id': 693287,
u'source': u'wikipedia-en',
u'weight': 0.06444444355406737},
{u'category': u'Free system software',
u'page_id': 6721544,
u'source': u'wikipedia-en',
u'weight': 0.06433942787438053},
{u'category': u'Software licenses',
u'page_id': 703100,
u'source': u'wikipedia-en',
u'weight': 0.06444444355406737},
{u'category': u'Linux kernel',
u'page_id': 13215678,
u'source': u'wikipedia-en',
u'weight': 0.06433942787438053},
{u'category': u'Monolithic kernels',
u'page_id': 10730969,
u'source': u'wikipedia-en',
u'weight': 0.06433942787438053},
{u'category': u'1991 software',
u'page_id': 11167446,
u'source': u'wikipedia-en',
u'weight': 0.09684039970133569},
{u'category': u'Linus Torvalds',
u'page_id': 53479567,
u'source': u'wikipedia-en',
u'weight': 0.09684039970133569}
],
u'language': {u'conf': 0.9999973266294648, u'lang': u'en'},
u'nbest': False,
u'onlyNER': False,
u'runtime': 107,
u'sentences': [{u'offsetEnd': 132, u'offsetStart': 0}],
u'text': u'Linux is a name that broadly denotes a family of free and open-source software operating systems (OS) built around the Linux kernel.'
},
200
)
Todo
The following methods are missing from this client:
fetchConcept
termDisambiguation
getNerdLocation
queryDisambiguation
pdfDisambiguation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file entity-fishing-client-0.4.0.tar.gz
.
File metadata
- Download URL: entity-fishing-client-0.4.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 006abc5af751d8e508ade6398ebb7256c633cda3cb4de14d6d5e87694534754e |
|
MD5 | 1b586e5c4a03f279f5cd1581da44cd1e |
|
BLAKE2b-256 | 04a60ab0ef6b3885c0e78aa7126086b5f92b08fd4f815b172aa17ab6f9eeb9ca |