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

fix uppercase in entity detection #154

Merged
merged 19 commits into from
May 6, 2022
Merged

Conversation

dmitrijeuseew
Copy link
Contributor

No description provided.

@@ -620,6 +620,8 @@ def find_top_triplets(entity, entity_substr, pos=None, token_conf=None, conf=Non
triplets["token_conf"] = token_conf
if conf is not None:
triplets["conf"] = conf
if entity_substr in entity_label.lower():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а entity_substr всегда lowercased?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не всегда, пофиксил

@@ -536,20 +536,22 @@ def el_formatter_dialog(dialog: Dict):
num_last_utterances = 2
ner_output = get_entities(dialog["human_utterances"][-1], only_named=True, with_labels=True)
nounphrases = dialog["human_utterances"][-1]["annotations"].get("cobot_entities", {}).get("entities", [])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

заменить на

nounphrases = get_entities(dialog["human_utterances"][-1], only_named=False, with_labels=False)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ок

annotators/NER/server.py Show resolved Hide resolved
@dilyararimovna
Copy link
Collaborator

все равно что-то не так. см логи тестов - сущности из реплики пользователя не cased

@dilyararimovna dilyararimovna merged commit 8476288 into dev May 6, 2022
@dilyararimovna dilyararimovna deleted the fix/uppercase_responses branch May 6, 2022 10:00
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

Successfully merging this pull request may close these issues.

4 participants