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 latest version of the client is the 0.2.1. 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.2.2.tar.gz
.
File metadata
- Download URL: entity-fishing-client-0.2.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28d79459cdbb0c9c993153e514b0c1b264e065341476951feb5f69cad7940d98 |
|
MD5 | 3256ede11b3039c5cdf93ba18e10b9fe |
|
BLAKE2b-256 | a09435b63e63e50a7296b508710283a33e34be56cf390a47fab11c155521e3db |