How to use your model to find keywords in a sentence

#1
by Ujjwal-vista - opened

I am new in this field, Please tell me how can I use your model to extract keywords from a sentence.
i have tried to use model.eval("the sentence that I was trying to find keywords ") but it gives output as "eval() takes 1 positional argument but 2 were given".
Please help

Hi! Ujjwal, Thanks for your interest. In order to extract keyphrases using the KBIR model, you can actually use it after finetuning. There are others who have finetuned the model on different datasets and made it available in Huggingface. Here are some of them:

  1. https://huggingface.co/ml6team/keyphrase-extraction-kbir-kptimes
  2. https://huggingface.co/ml6team/keyphrase-extraction-kbir-inspec
  3. https://huggingface.co/ml6team/keyphrase-extraction-kbir-semeval2017
  4. https://huggingface.co/ml6team/keyphrase-extraction-kbir-kpcrowd
  5. https://huggingface.co/ml6team/keyphrase-extraction-kbir-openkp

You can find elaborate instructions in each of these model cards. Essentially, finetuning KBIR will be similar to finetuning RoBERTa as it is built on top of it.

Another interesting piece of code is - https://huggingface.co/spaces/ml6team/keyphrase-extraction/blob/main/pipelines/keyphrase_extraction_pipeline.py
which should help you to use the Huggingface pipeline code.

You can also use other existing libraries like Flair NLP and simpletransformers to point to the huggingface model id and use their tools to finetune it

Hello, please tell me, which languages does this model support?

Bloomberg org

Hello Ayil! This is a monolingual model trained and finetuned on English resources.

Sign up or log in to comment