promptslab / PromptifyJs

Solve NLP Problems with Large Language Models in JavaScript
Apache License 2.0
21 stars 3 forks source link

[Feature request] Create template NER with keyword position for prompts #23

Open monk1337 opened 1 year ago

monk1337 commented 1 year ago

We already have the NER template https://github.com/promptslab/PromptifyJs/blob/main/examples/nerExample.js

But that is not returning the position of the entity in the raw test. We need to modify the template to add one more parameter called position: bool if true, return the format like below.

[{'E': '93-year-old', 'T': 'Age', 'start':29, 'end': 47}]

The 'start':29, 'end': 47 would be useful for the UI part.