/ Модель

Характеристики

Размер весов
451 МБ
Лицензия
MIT
Библиотека
flair
Опубликована
26 янв 2023

flair-ner-spanish-judicial

Разметка токеновТекст → label3 профессии

Модель Flair на основе BETO и BiLSTM-CRF извлекает именованные сущности из испаноязычных судебных решений по делам о гендерном насилии.

580скачиваний за 30 дней6лайковвеса обновлены25 янв 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель разработана коллективом collective.ai в рамках проекта AymurAI компании DataGenero. Это модель распознавания именованных сущностей для испаноязычных судебных решений: она построена на эмбеддингах BETO — версии BERT для испанского языка — и архитектуре BiLSTM-CRF, обученной по рекомендациям Flair. Модель извлекает из документов сведения, связанные с делами о гендерном насилии, включая даты рождения, даты вынесения решений и национальности.

Модель обучена на 1200 судебных решениях закрытого набора данных одного уголовного суда Аргентины. Она предназначена для полуавтоматизированного сбора и анализа данных о делах, а не для самостоятельной юридической оценки. В README приведены метрики по нескольким типам сущностей; например, F1 для дат рождения составляет 0,99, а для дат решений и национальностей — 0,96.

Результаты зависят от качества и единообразия документов. Из-за обучения на данных одного аргентинского суда модель может хуже работать с другими странами, правовыми системами и культурными контекстами. Проект AymurAI описан как прототип, внедряемый в одном суде Буэнос-Айреса. Лицензия модели — MIT.

Сценарии применения

  • извлечение дат рождения из судебных решений
  • извлечение дат вынесения судебных решений
  • извлечение национальностей из юридических документов
  • полуавтоматизированный сбор сведений о делах о гендерном насилии
  • подготовка структурированных данных для анализа аргентинских судебных решений

Ограничения

Обучение проводилось на закрытом наборе из 1200 решений одного уголовного суда Аргентины, поэтому качество на документах других стран и правовых систем может быть ниже. Результаты также зависят от качества и единообразия исходных данных.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Description

Following the FLAIR guidelines for training a NER model, we trained a model on top of BETO embeddings (a spanish version of BERT trained in a spanish corpus) and a BiLSTM-CRF architecture.

This model was developed by { collective.ai } as part of the AymurAI project by DataGenero.

About AymurAI, its uses and limitations

AymurAI is intended to be used as a tool to address the lack of available data in the judicial system on gender-based violence (GBV) rulings in Latin America. The goal is to increase report levels, build trust in the justice system, and improve access to justice for women and LGBTIQ+ people. AymurAI will generate and maintain anonymized datasets from legal rulings to understand GBV and support policy making, and also contribute to feminist collectives' campaigns.

AymurAI is still a prototype and is only being implemented in Criminal Court N°10 in the City of Buenos Aires, Argentina. Its capabilities are limited to semi-automated data collection and analysis, and the results may be subject to limitations such as the quality and consistency of the data, and the availability of the data. Additionally, the effectiveness of AymurAI in addressing the lack of transparency in the judicial system and improving access to justice may also depend on other factors such as the level of cooperation from court officials and the broader cultural and political context.

This model was trained with a closed dataset from an Argentine criminal court. It's is designed to identify and extract relevant information from court rulings related to GBV cases. The use of a domain specific dataset from an Argentine criminal court ensures that the model is tailored to the specific legal and cultural context, allowing for more accurate results. However, it also means that the model may not be applicable or effective in other countries or regions with different legal systems or cultural norms.

Usage

How to use the model in Flair

Requires: Flair. Install it with pip install flair

from flair.data import Sentence
from flair.models import SequenceTagger

# load tagger
tagger = SequenceTagger.load("aymurai/flair-ner-spanish-judicial")

# make example sentence
sentence = Sentence("1. DECLARAR EXTINGUIDA LA ACCIÓN PENAL en este caso por cumplimiento de la suspensión del proceso a prueba, y SOBRESEER a EZEQUIEL CAMILO MARCONNI, DNI 11.222.333, en orden a los delitos de lesiones leves agravadas, amenazas simples y agravadas por el uso de armas.")

# predict NER tags
tagger.predict(sentence)

# print sentence
print(sentence)

# print predicted NER spans
print('The following NER tags are found:')
# iterate over entities and print
for entity in sentence.get_spans('ner'):
    print(entity)

This yields the following output:

Span[2:11]: "EXTINGUIDA LA ACCIÓN PENAL en este caso por cumplimiento" → DETALLE (0.5498)
Span[13:18]: "suspensión del proceso a prueba" → OBJETO_DE_LA_RESOLUCION (0.5647)
Span[20:21]: "SOBRESEER" → DETALLE (0.7766)
Span[22:25]: "EZEQUIEL CAMILO MARCONNI" → NOMBRE (0.6454)
Span[35:36]: "lesiones" → CONDUCTA (0.9457)
Span[36:38]: "leves agravadas" → CONDUCTA_DESCRIPCION (0.8818)
Span[39:40]: "amenazas" → CONDUCTA (0.956)
Span[40:48]: "simples y agravadas por el uso de armas" → CONDUCTA_DESCRIPCION (0.6866)

Using the model in AymurAI platform

Please refeer to aymurai.info for more information of the full platform.

You can also check the development repository here.

Entities and metrics

Description

Please refer to the entities' description table (en|es).

For a complete description about entities considered by AymurAI, refer to the Glossary for the Dataset with gender perspective written by Criminal Court N°10 (spanish only).

Data

The model was trained with a dataset of 1200 legal rulings from an Argentine criminal court.

Due to the nature of the data the documents are kept private.

List of annotation contributors

The dataset was manually annotated by:

  • Diego Scopetta
  • Franny Rodriguez Gerzovich (email|linkedin)
  • Laura Barreiro
  • Matías Sosa
  • Maximiliano Sosa
  • Patricia Sandoval
  • Santiago Bezchinsky (email|linkedin)
  • Zoe Rodriguez Gerzovich

Metrics

labelprecisionrecallf1-score
FECHA_DE_NACIMIENTO0.980.990.99
FECHA_RESOLUCION0.950.980.96
NACIONALIDAD0.940.980.96
GENERO1.000.500.67
HORA_DE_INICIO0.980.920.95
NOMBRE0.940.950.95
FRASES_AGRESION0.900.980.94
HORA_DE_CIERRE0.900.920.91
NIVEL_INSTRUCCION0.850.940.90
N_EXPTE_EJE0.850.930.89
TIPO_DE_RESOLUCION0.630.930.75
VIOLENCIA_DE_GENERO0.490.590.54
RELACION_Y_TIPO_ENTRE_ACUSADO/A_Y_DENUNCIANTE0.930.760.84
HIJOS_HIJAS_EN_COMUN0.470.570.52
MODALIDAD_DE_LA_VIOLENCIA0.570.560.57
FECHA_DEL_HECHO0.830.830.83
CONDUCTA0.790.670.73
ART_INFRINGIDO0.760.740.75
DETALLE0.530.370.43
OBJETO_DE_LA_RESOLUCION0.600.780.68
CONDUCTA_DESCRIPCION0.540.430.48
LUGAR_DEL_HECHO0.750.470.58
EDAD_AL_MOMENTO_DEL_HECHO0.500.200.29
PERSONA_ACUSADA_NO_DETERMINADA0.710.190.30
macro avg0.770.720.73

GitHub

You can see our open-source development here.

Citation

Please cite the following paper when using AymurAI:

@techreport{feldfeber2022,
    author      = "Feldfeber, Ivana and Quiroga, Yasmín Belén  and Guevara, Clarissa  and Ciolfi Felice, Marianela",
    title       = "Feminisms in Artificial Intelligence:  Automation Tools towards a Feminist Judiciary Reform in Argentina and Mexico",
    institution = "DataGenero",
    year        = "2022",
    url         = "https://drive.google.com/file/d/1P-hW0JKXWZ44Fn94fDVIxQRTExkK6m4Y/view"
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · flair

Нельзя запустить

Модели Flair требуют отдельного рантайма.

Ревизия весов
d6dfe28

0 моделей