Difference between CRF_entity_extractor and DIET - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

👋 Introducing the Rasa Playground

Difference between CRF_entity_extractor and DIET

post by imene_tar on Jun 17, 2021

Hello!

I’m trying to build an entity extractor but I can’t see the difference between CRF_entity_extractor and DIET without transformer.

Here are the 2 configurations that I am using :

  1. CRF:
    pipeline:
      - name: WhitespaceTokenizer
      - name: CRFEntityExtractor
    
  2. DIET:
    pipeline:
      - name: WhitespaceTokenizer
      - name: CountVectorsFeaturizer
      - name: LexicalSyntacticFeaturizer
        features: [["low", "title", "upper"],
                  ["BOS", "EOS", "low", "prefix5", "prefix2", "suffix5", "suffix3", "suffix2", "upper", "title", "digit"],
                  ["low", "title", "upper"]]
      - name: DIETClassifier
        intent_classification: False
        entity_recognition: True
        use_masked_language_model: False
        number_of_transformer_layers: 0
    

After training the model, I tested them on the same test dataset and got similar results but not quite the same.

Apart from the feed forward, what’s exactly the difference between the models and which one should be best?

Also, when using dense features as well in CRF_entity_extractor, how to be sure of the dimension if not using feed forwards? (I’m not sure that the dense features are being taken into consideration as I can’t see any change when using them in the CRF)

Looking forward to reading your replies.