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

Make entity recognizers to be simple Recognizer #3097

Merged
merged 23 commits into from
Dec 7, 2020

Conversation

chon219
Copy link
Member

@chon219 chon219 commented Nov 30, 2020

Fixes #3039
Fixes #3044

Description

EntityRecognizers are simple wrappers around TextAnalytics APIs, but currently are only usable from within RegExRecognizer via the EntityRecognizerSet.
This delta makes all EntityRecognizers full blown recognizers, allowing them to be composed like any other recognizer in the system.

Specific Changes

  • Make EntityRecognizer class
  • Added ChannelMentionEntityRecognizer
  • Exposed EntityRecognizerSet in AdaptiveComponentRegistration
  • Updated @microsoft/recognizers-text-suite to latest version
  • Renamed protected method recognize in all EntityRecognizers to avoid conflicts with recognize method from parent EntityRecognizer
  • Change mapping of text recognizer ModelResult => entity structure to make the end + 1
  • Filter seed text entities

Testing

Ported tests from C#.

@chon219 chon219 added the Area: Adaptive The issue is related to Adaptive dialogs label Nov 30, 2020
@chon219 chon219 added this to the R12 milestone Nov 30, 2020
@chon219 chon219 requested review from stevengum and a team as code owners November 30, 2020 11:21
@coveralls
Copy link

coveralls commented Nov 30, 2020

Pull Request Test Coverage Report for Build 405236527

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 84.431%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-core/src/recognizerResult.ts 1 88.89%
libraries/botbuilder-dialogs-adaptive/src/recognizers/entityRecognizers/entityRecognizerSet.ts 1 91.18%
Totals Coverage Status
Change from base Build 401718224: 0.04%
Covered Lines: 17593
Relevant Lines: 19910

💛 - Coveralls

Copy link
Contributor

@joshgummersall joshgummersall left a comment

Choose a reason for hiding this comment

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

Couple of small changes, looks good though! Nice use of reduce and ??=.

@joshgummersall joshgummersall merged commit 3575cc3 into main Dec 7, 2020
@joshgummersall joshgummersall deleted the zim/entity-recognizer branch December 7, 2020 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Adaptive The issue is related to Adaptive dialogs
Projects
None yet
5 participants