snipsco / snips-nlu

Snips Python library to extract meaning from text
https://snips-nlu.readthedocs.io
Apache License 2.0
3.89k stars 513 forks source link

Filter for entity match feature #814

Closed ClemDoum closed 5 years ago

ClemDoum commented 5 years ago

Description:

Initial use case

When fitting the CRFSlotFiller on a intent, dropout is set once for all entities. However in practice we'd like to have a high dropout for automatically_extensible entities (since at inference time, we'll try to parse unseen entity values) and a lower dropout for non automatically_extensible entities (since we've seen all of them at training time)

Work done

Added the ability to filter entity to which the CustomEntityMatchFactory is applied. This entity_filter argument is passed as args in the CustomEntityMatchFactory configuration.

Currently only one flag can be set in the filter: automatically_extensible:

Updated the default language configuration accordingly.

Checklist: