license:cc-by-nc-4.0tags:-sentence-transformers-sentence-similarity-feature-extraction-dense-generated_from_trainer-loss:CosineSimilarityLossbase_model:stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1.0pipeline_tag:sentence-similaritylibrary_name:sentence-transformersmetrics:-pearson_dot-spearman_dot-pearson_euclidean-spearman_euclidean-pearson_manhattan-spearman_manhattan-pearson_cosine-spearman_cosinemodel-index:-name:>- SentenceTransformer based on stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1.0results:-task:type:semantic-similarityname:SemanticSimilaritydataset:name:stsdevdottype:sts-dev-dotmetrics:-type:pearson_dotvalue:0.6125529066567547name:PearsonDot-type:spearman_dotvalue:0.607020920491597name:SpearmanDot-type:pearson_dotvalue:0.6151741779356057name:PearsonDot-type:spearman_dotvalue:0.6095317749105116name:SpearmanDot-task:type:semantic-similarityname:SemanticSimilaritydataset:name:stsdeveuclidiantype:sts-dev-euclidianmetrics:-type:pearson_euclideanvalue:0.7076748166600304name:PearsonEuclidean-type:spearman_euclideanvalue:0.7205880822002616name:SpearmanEuclidean-type:pearson_euclideanvalue:0.7099832358841494name:PearsonEuclidean-type:spearman_euclideanvalue:0.7216899339827408name:SpearmanEuclidean-task:type:semantic-similarityname:SemanticSimilaritydataset:name:stsdevmanhattantype:sts-dev-manhattanmetrics:-type:pearson_manhattanvalue:0.706930206993536name:PearsonManhattan-type:spearman_manhattanvalue:0.7197955970878462name:SpearmanManhattan-type:pearson_manhattanvalue:0.7092200936299493name:PearsonManhattan-type:spearman_manhattanvalue:0.7209197353975371name:SpearmanManhattan-task:type:semantic-similarityname:SemanticSimilaritydataset:name:stsdevcosinetype:sts-dev-cosinemetrics:-type:pearson_cosinevalue:0.7244468292859898name:PearsonCosine-type:spearman_cosinevalue:0.7251349738474332name:SpearmanCosine-type:pearson_cosinevalue:0.7253818539410067name:PearsonCosine-type:spearman_cosinevalue:0.7209886641359866name:SpearmanCosine
SentenceTransformer based on stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1.0
This is a sentence-transformers model finetuned from stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1.0. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
"o autor possuía..., ",
"a parte autora é servidor pública...",
"a parte autora é..."
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 1.0000, 0.8019],# [1.0000, 1.0000, 0.8019],# [0.8019, 0.8019, 1.0000]])
Diretoria de Inteligência Artificial, Ciência de Dados e Estatística do Tribunal de Justiça do Estado de Goiás (TJGO).
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
STJ IRIS
@InProceedings{MeloSemantic,
author="Melo, Rui
and Santos, Pedro A.
and Dias, Jo{\~a}o",
editor="Moniz, Nuno
and Vale, Zita
and Cascalho, Jos{\'e}
and Silva, Catarina
and Sebasti{\~a}o, Raquel",
title="A Semantic Search System for the Supremo Tribunal de Justi{\c{c}}a",
booktitle="Progress in Artificial Intelligence",
year="2023",
publisher="Springer Nature Switzerland",
address="Cham",
pages="142--154",
abstract="Many information retrieval systems use lexical approaches to retrieve information. Such approaches have multiple limitations, and these constraints are exacerbated when tied to specific domains, such as the legal one. Large language models, such as BERT, deeply understand a language and may overcome the limitations of older methodologies, such as BM25. This work investigated and developed a prototype of a Semantic Search System to assist the Supremo Tribunal de Justi{\c{c}}a (Portuguese Supreme Court of Justice) in its decision-making process. We built a Semantic Search System that uses specially trained BERT models (Legal-BERTimbau variants) and a Hybrid Search System that incorporates both lexical and semantic techniques by combining the capabilities of BM25 and the potential of Legal-BERTimbau. In this context, we obtained a {\$}{\$}335{\backslash}{\%}{\$}{\$}335{\%}increase on the discovery metric when compared to BM25 for the first query result. This work also provides information on the most relevant techniques for training a Large Language Model adapted to Portuguese jurisprudence and introduces a new technique of Metadata Knowledge Distillation.",
isbn="978-3-031-49011-8"
}
@inproceedings{souza2020bertimbau,
author = {F{\'a}bio Souza and
Rodrigo Nogueira and
Roberto Lotufo},
title = {{BERT}imbau: pretrained {BERT} models for {B}razilian {P}ortuguese},
booktitle = {9th Brazilian Conference on Intelligent Systems, {BRACIS}, Rio Grande do Sul, Brazil, October 20-23 (to appear)},
year = {2020}
}
@inproceedings{fonseca2016assin,
title={ASSIN: Avaliacao de similaridade semantica e inferencia textual},
author={Fonseca, E and Santos, L and Criscuolo, Marcelo and Aluisio, S},
booktitle={Computational Processing of the Portuguese Language-12th International Conference, Tomar, Portugal},
pages={13--15},
year={2016}
}
@inproceedings{real2020assin,
title={The assin 2 shared task: a quick overview},
author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo},
booktitle={International Conference on Computational Processing of the Portuguese Language},
pages={406--412},
year={2020},
organization={Springer}
}
@InProceedings{huggingface:dataset:stsb_multi_mt,
title = {Machine translated multilingual STS benchmark dataset.},
author={Philip May},
year={2021},
url={https://github.com/PhilipMay/stsb-multi-mt}
}