Issue getting model to pick up on lookup table values

I am having trouble with lookup tables. I am using the python (3.6.5) API. It seems as if the model is either not finding the lookup table files or not able to read its values. When I look into the model folder after training, there are no files corresponding to the look-up tables or any sign of the lookup table values. The model picks up entities that are included in the training data but it does pick up the entities that are only in the lookup tables.

My nlu_config.yml file contains the following configuration

language: "en"

- name: "tokenizer_whitespace"
- name: "intent_featurizer_count_vectors"
- name: "intent_entity_featurizer_regex"
- name: "ner_crf"
  features: [
              ["low", "title", "upper"],
              ["bias", "low", "prefix5", "prefix2", "suffix5", "suffix3",
               "suffix2", "upper", "title", "digit", "pattern"],
              ["low", "title", "upper"]
- name: "intent_classifier_tensorflow_embedding"

I have a data folder that contains the file and the lookup table text file (newline separated) with 21 different locations. I’ve included 8 of the 21 locations in the file. I’ve referenced the lookup table in the file with the following lines:

## lookup : location 

when I train the model with the following python code (after installing the packages):

training_data = load_data('data/')
trainer = Trainer(config.load("nlu_config.yml"))
model_directory = trainer.persist('projects/')

the resulting model does not pick up on any of the location entities that are in the lookup table.

I seem to be out of ideas to make this work. Can anyone spot anything?

I am also facing the same issue. Did your issue got resolved?

I am having the same issue also i found in the training data json file created after training that he can reed the lookup file and saved it

“lookup_tables”: [ { “name”: “carake” “element”: " /data/carMake.txt" }]

Hi @hossa95 Try adding some examples from your lookup table to your nlu data. foreg. if you have a name lookup table like this.



name3 (There is no extra space between names only 1 line gap)

After this if you have a question like:

Q. How is name1?

similar to this add like,

Q. how is name2?

It will work then. If you have a longer list try adding more examples in nlu. I had 250 names in name.txt file . I had to add 10 names in nlu for bot to pick up the table.

Hope this helps

I solved it but my problem wasn’t in that… it was in the pipeline of NLU … I fixed it and now it can understand the lookup … thanks :slight_smile:

1 Like

can you tell me what changes you made in the pipeline?

Hi, could you please tell me what changes do you have? I am also having this issue for using look up table.

you have to use at least 10 examples in the common example part in order to work also use this in nlu pipeline

  • name: “tokenizer_spacy”
  • name: “intent_entity_featurizer_regex”
  • name: “intent_featurizer_spacy” i guess if you do this it will work
1 Like

please share your complete config file it would be great…