Transformers
Safetensors
mbart
text2text-generation
v1.0.0
entity-disambiguation
named-entity-linking
entity-linking
Instructions to use emanuelaboros/globalise-entity-linker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use emanuelaboros/globalise-entity-linker with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("emanuelaboros/globalise-entity-linker") model = AutoModelForSeq2SeqLM.from_pretrained("emanuelaboros/globalise-entity-linker") - Notebooks
- Google Colab
- Kaggle
| qid_to_location_label = { | |
| "Q82794": "geographical region", | |
| "Q6256": "country", | |
| "Q3624078": "sovereign state", | |
| "Q35657": "U.S. state", | |
| "Q515": "city", | |
| "Q532": "village", | |
| "Q3957": "town", | |
| "Q2983893": "municipality", | |
| "Q486972": "human settlement", | |
| "Q23442": "island", | |
| "Q8502": "mountain", | |
| "Q23397": "lake", | |
| "Q4022": "river", | |
| "Q123705": "peninsula", | |
| "Q13221722": "bay", | |
| "Q165": "sea", | |
| "Q124714": "ocean", | |
| "Q42124": "continent", | |
| "Q23413": "territory", | |
| "Q1048835": "province", | |
| "Q107390": "county", | |
| "Q13220204": "district", | |
| "Q13218630": "subdistrict", | |
| "Q618123": "location", # geographical object | |
| "Q2221906": "location", # geographical location | |
| "Q17334923": "location", # geographical region | |
| } | |
| TYPE_MAP = { | |
| "Q5": "person", # human | |
| "Q43229": "organization", # organization | |
| "Q95074": "organization", # company | |
| "Q783794": "organization", # non-profit | |
| "Q618123": "location", # geographical object | |
| "Q2221906": "location", # geographical location | |
| "Q17334923": "location", # geographical region | |
| "Q6256": "location", # country | |
| "Q515": "location", # city | |
| } | |
| qid_to_location_label_keys = set(qid_to_location_label.keys()) | |
| qid_to_organization_label = { | |
| "Q43229": "organization", # organization | |
| "Q95074": "company", # company | |
| "Q783794": "non-profit", # non-profit organization | |
| "Q891723": "international organization", | |
| "Q163740": "political party", | |
| "Q178706": "trade union", | |
| "Q189004": "government agency", | |
| "Q327333": "educational institution", | |
| "Q31855": "university", | |
| "Q219885": "research institute", | |
| "Q12973014": "NGO", # non-governmental organization | |
| "Q7210356": "television network", | |
| "Q33231": "military unit", | |
| "Q15911314": "sports club", | |
| "Q57660343": "media organization", | |
| "Q167037": "religious organization", | |
| "Q4438121": "publishing company", | |
| "Q2088357": "academic publisher", | |
| } | |
| qid_to_organization_label_keys = set(qid_to_organization_label.keys()) | |