Legal-NLP-EkStep / legal_NER

OpenNyAI is a mission aimed at developing open source software and datasets to catalyze the creation of AI-powered solutions to improve access to justice in India. Legal NER is one the AI component developed under this mission
https://opennyai.org/
Apache License 2.0
67 stars 26 forks source link

raise ValueError('{!r} is not a valid parameter name'.format(name)) #7

Closed magick93 closed 5 months ago

magick93 commented 1 year ago

Hello

I'm trying to run the following:

!pip install https://huggingface.co/opennyaiorg/en_legal_ner_trf/resolve/main/en_legal_ner_trf-any-py3-none-any.whl

# Using spacy.load().
import spacy
nlp = spacy.load("en_legal_ner_trf")
text = "Section 319 Cr.P.C. contemplates a situation where the evidence adduced by the prosecution for Respondent No.3-G. Sambiah on 20th June 1984"
doc = nlp(text)

# Print indentified entites
for ent in doc.ents:
     print(ent,ent.label_)

##OUTPUT     
#Section 319 PROVISION
#Cr.P.C. STATUTE
#G. Sambiah RESPONDENT
#20th June 1984 DATE

I get this error - raise ValueError('{!r} is not a valid parameter name'.format(name))

I'm using python 3.11.2.

Do you have any suggestions?

Thanks


Using python 3.9.0 I get this error:

TypeError: issubclass() arg 1 must be a class
prathameshk commented 1 year ago

If you are looking to run the pretrained model then it is encouraged that you use opennyai library https://github.com/OpenNyAI/Opennyai