Lookup table not giving desired result

Hi, i have gone through the blog Improving Entity Extraction with Lookup Tables.

I am facing challenges in getting the desired result, if anyone can help me understand how exactly this lookup functionality works.

Below are my files: nlu_entity_md=“”"

intent:Access

-Can I get access to ABCD [Animal & Bird Cat Data] (application)
-May I get access to CODE Control and Operational Dept Evaluation
-how do i get entry into ABCD?
-Access to ROSE
-How can I get access to FIFA
-How do I acees into Controls Room
-I want login to ABA?
-access to code?
-rose access
-Animal & Bird Cat Data access
-FIFA access
-FIFA access
-access to fifa
-access to aba
-Can I get access for [Animal & Bird Cat Data] (application:ABCD)
-May I get access for Control and Operational Dept Evaluation
-May I get access to control and operational dept evaluation
-how do i get access for fifa

lookup:application

  • ABCD
  • CODE
  • ROSE
  • ABA
  • FIFA
  • Controls Room
  • abcd
  • code
  • rose
  • aba
  • fifa
  • controls room
  • apple
  • rat
  • mat
  • value and prepositions “”" %store nlu_entity_md > nlu_entity.md
config file

config = “”" language: “en”

pipeline:

  • name: “SpacyNLP” # loads the spacy language model model: “en_core_web_md” case_sensitive: true
  • name: “SpacyTokenizer” # splits the sentence into tokens
  • name: “RegexFeaturizer”
  • name: “CRFEntityExtractor” features: [[“low”, “titlmate”, “upper”],[“bias”, “low”, “prefix5”, “prefix2”, “suffix5”, “suffix3”,“suffix2”, “upper”, “title”, “digit”, “pattern”],[“low”, “title”, “upper”]]

“”"

%store config > config.yml indent preformatted text by 4 spaces ########## test data sent=[‘access to aba’, ‘how do i get access to ROSE’, ‘can i get access to fifa’, ’ how do i get access to RANDOM’, ‘access to MAT’, ‘access to mat’, ‘access to value and prepositions’, ‘access to JIRA’]

queries that i have.

  1. Why it is unable to pick up the entity mat and ’ value and prepositions" even tough its there in look up table?
  2. RANDOM is not there in lookup table but i believe CRF is able to understand the structure of sentence and predict the entity, thus in this case even if i remove the MAT from the lookup it would work, then how exactly LOOKUP table is useful for us.
  3. How do i handle entities that are of more than one word, do i need to train for all such values.
  4. How exactly lookup tables are used for entity extraction?

Hi @abhi_bh_nlp, try to include all your lookup words in the training set. It should work then.

That’s what i am failing to understand, if i have to give all the words in the training sets how is lookup table helpful. Is it just that it creates additional feature for CRF , so that probability of getting recognized of entity increases?

Yes! The lookup transforms to features for CRF.

1 Like

I have similiar question: Whether do I need include all data in lookup table into nlu training data? If yes, why do I need to use lookup tables? and the volumn of nlu training data will be too much, it will cost a long time to train.

Waiting someone for giving the answer. Thanks.

2 Likes