Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

amixh
/
sentence-embedding-model-InLegalBERT-2

Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:1788
loss:TripletLoss
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use amixh/sentence-embedding-model-InLegalBERT-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use amixh/sentence-embedding-model-InLegalBERT-2 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("amixh/sentence-embedding-model-InLegalBERT-2")
    
    sentences = [
        "[IPC_SECTION_351] According to Whoever makes any gesture, or any preparation intending or knowing it to be likely that such gesture or preparation will cause any person present to apprehend that he who makes that gesture or preparation is about to use criminal force to that person, is said to commit an assault. IPC 351 in Simple Words they are considered to have committed an assault.",
        "[CRPC_SECTION_162] Section 162, No statement made by any person to a police officer in the course of an investigation under this Chapter, shall, if reduced to writing, be signed by the person making it; nor shall any such statement or any record thereof, whether in a police diary or otherwise, or any part of such statement or record, be used for any purpose, save as hereinafter provided, at any inquiry or trial in respect of any offence under investigation at the time when such statement was made; Provided that when any witness is called for the prosecution in such inquiry or trial whose statement has been reduced into writing as aforesaid, any part of his statement, if duly proved, may be used by the accused, and with the permission of the Court, by the prosecution, to contradict such witness in the manner provided by section 145 of the , 1872 (1 of 1872); and when any part of such statement is so used, any part thereof may also be used in the re-examination of such witness, but for the purpose only of explaining any matter referred to in his cross-examination. Nothing in this section shall be deemed to apply to any statement falling within the provisions of clause (1) of section 32 of the , 1872 (1 of 1872), or to affect the provisions of section 27 of that Act.",
        "Section 446A, Without prejudice to the provisions of section 446, where a bond under this Code is for appearance of a person in a case and it is forfeited for breach of a condition— the bond executed by such person as well as the bond, if any, executed by one or more of his sureties in that case shall stand cancelled; and thereafter no such person shall be released only on his own bond in that case, if the Police Officer or the Court, as the case may be, for appearance before whom the bond was executed, is satisfied that there was no sufficient cause for the failure of the person bound by the bond to comply with its condition; Provided that subject to any other provision of this Code he may be released in that case upon the execution of a fresh personal bond for such sum of money and bond by one or more of such sureties as the Police Officer or the Court, as the case may be, thinks sufficient.",
        "According to Whoever makes any gesture, or any preparation intending or knowing it to be likely that such gesture or preparation will cause any person present to apprehend that he who makes that gesture or preparation is about to use criminal force to that person, is said to commit an assault. IPC 351 in Simple Words they are considered to have committed an assault."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
sentence-embedding-model-InLegalBERT-2
449 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
amixh's picture
amixh
Add new SentenceTransformer model
e3ca62b verified about 1 year ago
  • 1_Pooling
    Add new SentenceTransformer model about 1 year ago
  • .gitattributes
    1.52 kB
    initial commit about 1 year ago
  • README.md
    44.3 kB
    Add new SentenceTransformer model about 1 year ago
  • added_tokens.json
    99.2 kB
    Add new SentenceTransformer model about 1 year ago
  • config.json
    649 Bytes
    Add new SentenceTransformer model about 1 year ago
  • config_sentence_transformers.json
    205 Bytes
    Add new SentenceTransformer model about 1 year ago
  • model.safetensors
    447 MB
    xet
    Add new SentenceTransformer model about 1 year ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model about 1 year ago
  • sentence_bert_config.json
    53 Bytes
    Add new SentenceTransformer model about 1 year ago
  • special_tokens_map.json
    695 Bytes
    Add new SentenceTransformer model about 1 year ago
  • tokenizer.json
    1.29 MB
    Add new SentenceTransformer model about 1 year ago
  • tokenizer_config.json
    559 kB
    Add new SentenceTransformer model about 1 year ago
  • vocab.txt
    222 kB
    Add new SentenceTransformer model about 1 year ago