OpenPrompt icon indicating copy to clipboard operation
OpenPrompt copied to clipboard

[help] How to do NER using OpenPrompt?

Open megaduks opened this issue 2 years ago • 2 comments

Hello, despite my best efforts, I could not succeed in NER tagging using OpenPrompt. The docs show an example of a prompt for NER tagging, but I haven't managed to put all the pieces together. I have assumed that it should be done using PromptForGeneration and I was trying to adapt https://github.com/thunlp/OpenPrompt/blob/main/tutorial/2.1_conditional_generation.py, but to no avail.

Could someone post a simple example of tagging entities in a sentence? That would be extremely useful and appreciated.

megaduks avatar Jan 15 '23 19:01 megaduks

I would also love to see this

NtaylorOX avatar Mar 27 '23 09:03 NtaylorOX

Doing NER with prompt learning is not a straightforward task, because in NER you are basically doing classification for every token in the sentence. You can refer to this paper Template-free Prompt Tuning for Few-shot NER

yulinchen99 avatar Mar 30 '23 07:03 yulinchen99