# While extracting duration with duckling how can we get the second normalized value instade of the first value?

**URL:** <https://forum.rasa.com/t/while-extracting-duration-with-duckling-how-can-we-get-the-second-normalized-value-instade-of-the-first-value/36791>\
**Category:** Rasa Open Source\
**Created:** [November 8, 2020, 9:02pm UTC](https://forum.rasa.com/t/while-extracting-duration-with-duckling-how-can-we-get-the-second-normalized-value-instade-of-the-first-value/36791 "2020-11-08T21:02:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![faiza\_conte](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@faiza\_conte](https://forum.rasa.com/u/faiza_conte)\
**Post date:** [November 8, 2020, 9:02pm UTC](https://forum.rasa.com/t/while-extracting-duration-with-duckling-how-can-we-get-the-second-normalized-value-instade-of-the-first-value/36791/1 "2020-11-08T21:02:00Z")

</div>

while extracting duration with duckling how can we get the second normalized value instade of the first value?

 ![Screenshot (275)](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/b/b0f19bf5d3423117971888baf1470a419aa71494.png)

---

<div class="post-metadata">

**Author:** ![\_daisy](https://avatars.discourse-cdn.com/v4/letter/_/ecccb3/32.png) [@\_daisy](https://forum.rasa.com/u/_daisy)\
**Post date:** [November 17, 2020, 6:20pm UTC](https://forum.rasa.com/t/while-extracting-duration-with-duckling-how-can-we-get-the-second-normalized-value-instade-of-the-first-value/36791/2 "2020-11-17T18:20:57Z")

</div>

I’m having the same problem. Did you find a solution to this?

---

<div class="post-metadata">

**Author:** ![faiza\_conte](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@faiza\_conte](https://forum.rasa.com/u/faiza_conte)\
**Post date:** [November 17, 2020, 6:43pm UTC](https://forum.rasa.com/t/while-extracting-duration-with-duckling-how-can-we-get-the-second-normalized-value-instade-of-the-first-value/36791/3 "2020-11-17T18:43:17Z")

</div>

@_daisy Sorry I dont know how to post a code 😁

- data = tracker.latest\_message[“entities”]
- print(‘1\>’, data)
- #If there are other entities in the list, it will be filtered to return only entities of type “duration”
- data = list(filter( lambda entity: entity[‘entity’] == “duration”, tracker.latest\_message[“entities”] ))
- print(‘2\>’, data)
- if data:
- normalized = data[0][“additional\_info”][“normalized”]
- print(‘3\>’, normalized[“value”], normalized[“unit”])
- dispatcher.utter\_message(text=f"{normalized[‘value’]} {normalized[‘unit’]}")
- else:
- dispatcher.utter\_message(text=“Entity not found”)

 ![Screenshot (286)](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/7/713ce6f20e69393109a8e42987f43029593ff1fe.png)
