ayoubkirouane / BERT-base_NER-ar

huggingface.co
Total runs: 10
24-hour runs: 2
7-day runs: -13
30-day runs: -32
Model's Last Updated: September 29 2023
token-classification

Introduction of BERT-base_NER-ar

Model Details of BERT-base_NER-ar

Model Name: BERT-base_NER-ar
Model Description :

BERT-base_NER-ar is a fine-tuned BERT multilingual base model for Named Entity Recognition (NER) in Arabic. The base model was pretrained on a diverse set of languages and fine-tuned specifically for the task of NER using the "wikiann" dataset. This model is case-sensitive, distinguishing between different letter cases, such as "english" and "English."

Dataset

The model was fine-tuned on the wikiann dataset, which is a multilingual named entity recognition dataset. It contains Wikipedia articles annotated with three types of named entities: LOC (location), PER (person), and ORG (organization). The annotations are in the IOB2 format. The dataset supports 176 of the 282 languages from the original WikiANN corpus.

Supported Tasks and Leaderboards

The primary supported task for this model is named entity recognition (NER) in Arabic. However, it can also be used to explore the zero-shot cross-lingual capabilities of multilingual models, allowing for NER in various languages.

Use Cases
  • Arabic Named Entity Recognition : BERT-base_NER-ar can be used to extract named entities (such as names of people, locations, and organizations) from Arabic text. This is valuable for information retrieval, text summarization, and content analysis in Arabic language applications.

  • Multilingual NER : The model's multilingual capabilities enable it to perform NER in other languages supported by the "wikiann" dataset, making it versatile for cross-lingual NER tasks.

Limitations
  • Language Limitation : While the model supports multiple languages, it may not perform equally well in all of them. Performance could vary depending on the quality and quantity of training data available for specific languages.

  • Fine-Tuning Data : The model's performance is dependent on the quality and representativeness of the fine-tuning data (the "wikiann" dataset in this case). If the dataset is limited or biased, it may affect the model's performance.

Usage :
from transformers import AutoModelForTokenClassification, AutoTokenizer
import torch 
# Load the fine-tuned model
model = AutoModelForTokenClassification.from_pretrained("ayoubkirouane/BERT-base_NER-ar")
tokenizer = AutoTokenizer.from_pretrained("ayoubkirouane/BERT-base_NER-ar")

# Tokenize your input text
text = "عاصمة فلسطين هي القدس الشريف."
tokens = tokenizer.tokenize(tokenizer.decode(tokenizer.encode(text)))

# Convert tokens to input IDs
input_ids = tokenizer.convert_tokens_to_ids(tokens)

# Perform NER inference
with torch.no_grad():
    outputs = model(torch.tensor([input_ids]))

# Get the predicted labels for each token
predicted_labels = outputs[0].argmax(dim=2).cpu().numpy()[0]

# Map label IDs to human-readable labels
predicted_labels = [model.config.id2label[label_id] for label_id in predicted_labels]

# Print the tokenized text and its associated labels
for token, label in zip(tokens, predicted_labels):
    print(f"Token: {token}, Label: {label}")

Runs of ayoubkirouane BERT-base_NER-ar on huggingface.co

10
Total runs
2
24-hour runs
0
3-day runs
-13
7-day runs
-32
30-day runs

More Information About BERT-base_NER-ar huggingface.co Model

BERT-base_NER-ar huggingface.co

BERT-base_NER-ar huggingface.co is an AI model on huggingface.co that provides BERT-base_NER-ar's model effect (), which can be used instantly with this ayoubkirouane BERT-base_NER-ar model. huggingface.co supports a free trial of the BERT-base_NER-ar model, and also provides paid use of the BERT-base_NER-ar. Support call BERT-base_NER-ar model through api, including Node.js, Python, http.

ayoubkirouane BERT-base_NER-ar online free

BERT-base_NER-ar huggingface.co is an online trial and call api platform, which integrates BERT-base_NER-ar's modeling effects, including api services, and provides a free online trial of BERT-base_NER-ar, you can try BERT-base_NER-ar online for free by clicking the link below.

ayoubkirouane BERT-base_NER-ar online free url in huggingface.co:

https://huggingface.co/ayoubkirouane/BERT-base_NER-ar

BERT-base_NER-ar install

BERT-base_NER-ar is an open source model from GitHub that offers a free installation service, and any user can find BERT-base_NER-ar on GitHub to install. At the same time, huggingface.co provides the effect of BERT-base_NER-ar install, users can directly use BERT-base_NER-ar installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

BERT-base_NER-ar install url in huggingface.co:

https://huggingface.co/ayoubkirouane/BERT-base_NER-ar

Url of BERT-base_NER-ar

Provider of BERT-base_NER-ar huggingface.co

ayoubkirouane
ORGANIZATIONS

Other API from ayoubkirouane