# Intent Classification using NLU

**URL:** <https://forum.rasa.com/t/intent-classification-using-nlu/50816>\
**Category:** Rasa Open Source\
**Created:** [January 23, 2022, 6:53pm UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816 "2022-01-23T18:53:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![darshanpv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/darshanpv/32/19063_2.png) [@darshanpv](https://forum.rasa.com/u/darshanpv)\
**Post date:** [January 23, 2022, 6:53pm UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816/1 "2022-01-23T18:53:43Z")

</div>

I was running a successful NLU intent classifier using an older RASA version. Following modules were used for Intent classification.

```
from rasa.nlu.model import Interpreter  
from rasa.shared.nlu.training_data.loading import load_data  

```

However, with the new Rasa version, I see the code does not work anymore. The sample code for the intent prediction was

```
interpreter = Interpreter.load(model_path)
data = interpreter.parse(utterance)

```

Can someone help me what would be the code for Rasa 3.0.5 ?

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [January 24, 2022, 12:26pm UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816/2 "2022-01-24T12:26:38Z")

</div>

@darshanpvyou have to use the Agent class to parse message now

```auto
from rasa.core.agent import Agent
agent = Agent.load(model_path)
result = await agent.parse_message(message)

```

Though after converting, i have seen significant memory usage(almost 40% more) and longer load times

Could you please check as well.

---

<div class="post-metadata">

**Author:** ![darshanpv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/darshanpv/32/19063_2.png) [@darshanpv](https://forum.rasa.com/u/darshanpv)\
**Post date:** [January 24, 2022, 10:02pm UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816/3 "2022-01-24T22:02:01Z")

</div>

Thanks @souvikg10 I was able to classify the intent.

In my case, I am using the following NLU configuration, and works fine with no performance hit.

```
language: en
pipeline:
 - name: WhitespaceTokenizer
 - name: RegexFeaturizer
 - name: LexicalSyntacticFeaturizer
 - name: CountVectorsFeaturizer
 - name: CountVectorsFeaturizer
   analyzer: char_wb
   min_ngram: 1
   max_ngram: 4
 - name: DIETClassifier
   epochs: 100
 - name: EntitySynonymMapper
 - name: ResponseSelector
   epochs: 100
```

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [January 25, 2022, 8:14am UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816/4 "2022-01-25T08:14:19Z")

</div>

can you check the load time of the model?

for me it kind of doubled but i think that is since version 2.8.9

---

<div class="post-metadata">

**Author:** ![isgaal](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/isgaal/32/2787_2.png) [@isgaal](https://forum.rasa.com/u/isgaal)\
**Post date:** [January 25, 2022, 10:52am UTC](https://forum.rasa.com/t/intent-classification-using-nlu/50816/5 "2022-01-25T10:52:05Z")

</div>

+1
