Palashio / libra

Ergonomic machine learning for everyone.
http://libradocs.org/
MIT License
1.91k stars 108 forks source link

Name Entity Recognition function added #333

Closed Piyush1416 closed 3 years ago

Piyush1416 commented 3 years ago

name: b) New feature: Name Entity Recognition about: Select this if you're adding a new feature to libra. labels: ner

This pull request closes #256 .

- What I did

I added a new functionality to detect name entities from input dataframe

- How I did it

I used the huggingface library which provides multi-lingual BERT based models for entity recognition.

- How to verify it

test cases added in tests.

Inorder to use it, you can run below commands:

newClient = client('location of csv file') ouput_dictionary_of_ners = newClient.get_ner() <even self.model['ner'] contains the output along with pretrained model and tokenizer>

This pull request adds a new feature to libra. @Palashio, could you please take a look at it?

Piyush1416 commented 3 years ago

it failed due to wrong dataset in test, I have updated the test file now