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

Named Entity demo - what version? #41

Open
ghnp5 opened this issue Jan 27, 2025 · 1 comment
Open

Named Entity demo - what version? #41

ghnp5 opened this issue Jan 27, 2025 · 1 comment

Comments

@ghnp5
Copy link

ghnp5 commented Jan 27, 2025

Hello,

Is it possible to know what exact model is this using? https://7002.deeppavlov.ai/model

I'm not getting the same responses when I use the latest version of ner_mult_long_demo from deeppavlov/DeepPavlov#1657

But even if I use ner_bert_base, I get the exact same results as ner_mult_long_demo. (still different from what I get when I use the demo in the website)

The demo on the website seems to be giving more accurate responses than my deployed API... so that's why I'd like to replicate what you have deployed in your demo :)

Thanks!


A few examples (don't mind the meaning of the texts - they're just random stuff):

{"x":["after doing a ritual I wanna come clean he was definitely in the wrong"]}

Demo:

[[
	["after","doing","a","ritual","I","wanna","come","clean","he","was","definitely","in","the","wrong"],
	["O","O","O","O","O","O","O","O","O","O","O","O","O","O"]
]]

My deployed API (ner_mult_long_demo):

[[
	["after","doing","a","ritual","I","wanna","come","clean","he","was","definitely","in","the","wrong"],
	["O","O","O","O","O","O","O","O","O","O","B-PERSON","O","O","O"]
]]

Test with ner_demo_mdeberta_address:

[
	[["after","doing","a","ritual","I","wanna","come","clean","he","was","definitely","in","the","wrong"]],
	[["O","O","O","O","O","O","O","O","O","O","O","O","O","O"]]
]

{"x":["he was definitely in the wrong"]}

Demo:

[[
	["he","was","definitely","in","the","wrong"],
	["O","O","O","O","O","O"]
]]

My deployed API (ner_mult_long_demo):

[[
	["he","was","definitely","in","the","wrong"],
	["O","O","B-NORP","O","O","O"]
]]

Test with ner_demo_mdeberta_address:

[
	[["he","was","definitely","in","the","wrong"]],
	[["O","O","O","O","O","O"]]
]

{"x":["so I sent in my final text I tried to make a post on Twitter just for it to tag him when I was having a private text with @youtube officials"]}

Demo:

[[
	["so","I","sent","in","my","final","text","I","tried","to","make","a","post","on","Twitter",
	"just","for","it","to","tag","him","when","I","was","having","a","private","text","with","@","youtube","officials"],
	["O","O","O","O","O","O","O","O","O","O","O","O","O","O","B-MEDIA_TYPE",
	"O","O","O","O","O","O","O","O","O","O","O","O","O","O","O","O","O"]
]]

My deployed API (ner_mult_long_demo):

[[
	["so","I","sent","in","my","final","text","I","tried","to","make","a","post","on","Twitter",
	"just","for","it","to","tag","him","when","I","was","having","a","private","text","with","@youtube","officials"],
	["O","O","O","O","O","O","O","O","O","O","O","O","O","O","B-MEDIA_TYPE",
	"O","O","O","O","O","O","O","O","O","O","O","O","O","O","B-BUSINESS_NAME","O"]
]]

Test with ner_demo_mdeberta_address:

[
	[["so","I","sent","in","my","final","text","I","tried","to","make","a","post","on","Twitter",
	"just","for","it","to","tag","him","when","I","was","having","a","private","text","with","@youtube","officials"]],
	[["O","O","O","O","O","O","O","O","O","O","O","O","O","O","B-MEDIA_TYPE",
	"O","O","O","O","O","O","O","O","O","O","O","O","O","O","B-BUSINESS_NAME","O"]]
]

{"x":["I was having a private text with @youtube officials"]}

Demo:

[[
	["I","was","having","a","private","text","with","@","youtube","officials"],
	["O","O","O","O","O","O","O","O","O","O"]
]]

My deployed API (ner_mult_long_demo):

[[
	["I","was","having","a","private","text","with","@youtube","officials"],
	["O","O","O","O","O","O","O","O","B-RELATION"]
]]

Test with ner_demo_mdeberta_address:

[
	[["I","was","having","a","private","text","with","@youtube","officials"]],
	[["O","O","O","O","O","O","O","B-MEDIA_TYPE","B-RELATION"]]
]

This matches the label given, but the demo does not include "@", while my deployed API does:

{"x":["I was having a private text with @youtube"]}

Demo:

[[
	["I","was","having","a","private","text","with","@","youtube"],
	["O","O","O","O","O","O","O","O","B-MEDIA_TYPE"]
]]

My deployed API (ner_mult_long_demo):

[[
	["I","was","having","a","private","text","with","@youtube"],
	["O","O","O","O","O","O","O","B-MEDIA_TYPE"]
]]

Test with ner_demo_mdeberta_address:

[
	[["I","was","having","a","private","text","with","@youtube"]],
	[["O","O","O","O","O","O","O","B-MEDIA_TYPE"]]
]
@ghnp5
Copy link
Author

ghnp5 commented Jan 31, 2025

This is a funny one... with the ner_demo_mdeberta_address JSON of the pull request, I get a WORK_OF_ART for an empty token !!

How are you?.

ner_demo_mdeberta_address JSON of the pull request:

[[["How","are","you","?","","."]],[["O","O","O","O","B-WORK_OF_ART","O"]]]

Demo:

[[["How","are","you","?","."],["O","O","O","O","O"]]]

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

1 participant