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.
Metadata
Release files for py-entity-linking-el 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_entity_linking_el-0.1.8.tar.gz | 7.9 kB | Without provenance | Details for py_entity_linking_el-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_entity_linking_el-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for py_entity_linking_el-0.1.8-py3-none-any.whl |
Total release size: 15.8 kB
Release files / py_entity_linking_el-0.1.8.tar.gz
| Download URL | py_entity_linking_el-0.1.8.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
611166065ccb10c5fadd6fa07af11e8824b1c692518ac34562ea01c02634f481
|
|
BLAKE2b-256 checksum How to use checksums |
4e4142ba1a87f5f39c051d7445dd0991636b69182520baf8b2b5ff353b2292e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|
Release files / py_entity_linking_el-0.1.8-py3-none-any.whl
| Download URL | py_entity_linking_el-0.1.8-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d12043fa7a3583cc3444b7d9667af1a071a25ff67c1b45d8f1ae404d8241d300
|
|
BLAKE2b-256 checksum How to use checksums |
ff5eb0a60cebb1bbb94e44d2672fd2508d144eba49bf132ea7396b320add967b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|
Security for py-entity-linking-el 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.