Skip to main content

A lightweight library for entity linking in Greek.

Project description

Lightweight entity linking solution for Greek language.

Please consider citing our works if you use code from this repository. Also, we recommend using a Colab T4 GPU for faster results.

Main dependencies

  • python>=3.10
  • numpy==1.26.4
  • SPARQLWrapper==2.0.0
  • sentence_transformers==3.1.1
  • aiohttp==3.9.5
  • openai==1.55.3
  • httpx==0.28.1
  • beautifulsoup4==4.12.2
  • nest_asyncio==1.5.8

Example & Usage

from linking import main

# Your API token which can be found here (https://github.com/marketplace/models/azure-openai/gpt-4o)
api_token = "YOUR_API_TOKEN"

main.EL(api_token=api_token,
	sentence="Χάρη στην ΕΦΓ, μια μηχανή μπορεί να 'καταλάβει' το περιεχόμενο των εγγράφων, συμπεριλαμβανομένων των αποχρώσεων του πλαισίου των της γλώσσας σε αυτά.",
	mention="ΕΦΓ",
	single="No",
	combination="No",
	embedding_model="intfloat/multilingual-e5-large-instruct")
The correct entity for 'ΕΦΓ' is:

Wikipedia: https://el.wikipedia.org/wiki/Επεξεργασία_φυσικής_γλώσσας

Wikidata: https://www.wikidata.org/wiki/Q30642

DBpedia: http://dbpedia.org/resource/Natural_language_processing


Execution Time: 00:00:29

Parameters

  • api_token: Your API token from here. (Required)
  • sentence: A Greek text. (Required)
  • mention: The mention you want to perform the linking, the mention should be from inside the provided sentence. (Required)
  • single: Usually used for difficult mentions, it searches each word of the mention individually, (deafult="No"), (Values: "Yes", "No"). (Optional)
  • combination: Usually used for difficult mentions, it makes combinations for each word of the mention, (deafult="No"), (Values: "Yes", "No"). (Optional)
  • embedding_model: A sentence-transformers model to perform text similarity, (deafault="intfloat/multilingual-e5-large-instruct"), (Values: str of the name of any sentence-transformers model that supports Greek). (Optional)

Licence

This library is licensed under the CC-BY-NC 4.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_entity_linking_el-0.1.7.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_entity_linking_el-0.1.7-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file py_entity_linking_el-0.1.7.tar.gz.

File metadata

  • Download URL: py_entity_linking_el-0.1.7.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for py_entity_linking_el-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4bb1b6aef7cd639deb32616d5c76ba528a1a11a3255c60d736d845ce28ed989c
MD5 e3e76cd0ab77ab6a51531925eff15f02
BLAKE2b-256 cf0a46b001fe69cf3b776ba726144ac0e059134dc4545d5d6e2ae30db585e3a2

See more details on using hashes here.

File details

Details for the file py_entity_linking_el-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for py_entity_linking_el-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c016b08dde799aa07a16ffe1b52478c04f98a2666eda92e1d089e4c78fcc77f6
MD5 73f050e4f61902fd3aae29d8b057fa85
BLAKE2b-256 5b3c6055cb649be21bede6be89ac055f85c751b291f386cfcf160682a1d2907a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page