Skip to content

Instantly share code, notes, and snippets.

@jcabot
Created May 9, 2022 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcabot/f72c21788ce02fddfd0aaf1b1a239b4d to your computer and use it in GitHub Desktop.
Save jcabot/f72c21788ce02fddfd0aaf1b1a239b4d to your computer and use it in GitHub Desktop.
creating an intent with a custom ner
def test_intent_with_ner_initialization():
entity: CustomEntity = CustomEntity('city_entity', [CustomEntityEntry('Barcelona', ['BCN']), CustomEntityEntry('Madrid')])
intent: Intent = Intent('intent_name', ['what is the weather like in mycity', 'forecast for mycity', 'is it sunny?'], [EntityReference('city', 'mycity', entity)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment