Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Index of entity in NER ? #87

Open
NeoKun004 opened this issue Jul 20, 2023 · 1 comment
Open

Adding Index of entity in NER ? #87

NeoKun004 opened this issue Jul 20, 2023 · 1 comment

Comments

@NeoKun004
Copy link

Hello ,
i was wondering if its possible to use Promptfy to return the NER and the index of the detected entities , that will help alot in NER tasks ( cause some text have multipe NERs and having the index will help bypassing that issue

@NeoKun004 NeoKun004 changed the title Adding Index of entity in NER and token consumption ? Adding Index of entity in NER ? Jul 20, 2023
@Hadjerkhd
Copy link

You can change the output_format in pipeline and do something like this

pipeline = Pipeline(self.prompter, self.model, 
                                 output_format='[{"T":"entity type", "E":"entity text", "start": "entity start index", "end":"entity end index"}, {"T":"entity type", "E":"entity text", "start": "entity start index", "end":"entity end index"},...]',)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants