This is the initial release of our artificial intelligence model on modelers . It is important to note that this version is just the beginning; the model will be constantly improved over time. Currently, the model boasts an accuracy of 79%, but we plan to increase this regularly through monthly updates.
We are proud to announce that our model is currently the only one in Italy capable of identifying a wide range of 52 different categories. This capability distinctly sets it apart from other models available in the Italian landscape, offering an unprecedented level of versatility and breadth in entity recognition.
The model is based on the BERT architecture, one of the most advanced technologies in the field of Natural Language Processing (NLP). State-of-the-art techniques have been employed for its training, ensuring high-level accuracy and efficiency. This technological choice ensures a deep and sophisticated understanding of natural language.
The model is capable of identifying the following categories:
To utilize this model:
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
from openmind import is_torch_npu_available
from openmind_hub import snapshot_download
import argparse
import torch
import torch_npu
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument( "--model_name_or_path", type=str, help="Path to model", default=None)
args = parser.parse_args()
return args
args = parse_args()
if args.model_name_or_path:
model_path = args.model_name_or_path
else:
model_path = snapshot_download(
"CICC/Italian_NER_XXL",
revision="main",
resume_download=True,
ignore_patterns=["*.h5", "*.ot", " *.msgpack"]
)
#model_path = args.model_name_or_path
device = torch.device('npu:0') if is_torch_npu_available() else torch.device('cpu')
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForTokenClassification.from_pretrained(model_path, ignore_mismatched_sizes=True).to(device)
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = """Il commendatore Gianluigi Alberico De Laurentis-Ponti, con residenza legale in Corso Imperatrice 67, Torino, avente codice fiscale DLNGGL60B01L219P, è amministratore delegato della "De Laurentis Advanced Engineering Group S.p.A.", che si trova in Piazza Affari 32, Milano (MI); con una partita IVA di 09876543210, la società è stata recentemente incaricata di sviluppare una nuova linea di componenti aerospaziali per il progetto internazionale di esplorazione di Marte."""
ner_results = nlp(example)
print(ner_results)
The primary goal of this model is to provide effective and accurate identification of a wide range of entities, surpassing the limits of traditional models. Being the only model in Italy to recognize so many entities, we are confident that it will be an invaluable tool for numerous application areas. Constant evolution and improvement of the model is our top priority to ensure always top-notch performance.
If you are interested in contributing to this project, have suggestions for improvement, or require a specific named entity recognizer for your use case, please feel free to reach out. Your input and collaboration can significantly enhance the model's capabilities and applications. For any inquiries or to discuss potential contributions, please contact Michele Montebovi at montebovi.michele@gmail.com. Your support and participation are highly appreciated as we aim to continuously improve and expand the functionalities of the Italian_NER_XXL model.