# How does rasa achieve unit conversion?

**URL:** <https://forum.rasa.com/t/how-does-rasa-achieve-unit-conversion/17212>\
**Category:** Rasa Open Source\
**Created:** [September 25, 2019, 6:30am UTC](https://forum.rasa.com/t/how-does-rasa-achieve-unit-conversion/17212 "2019-09-25T06:30:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gongshaojie12](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/gongshaojie12/32/5114_2.png) [@gongshaojie12](https://forum.rasa.com/u/gongshaojie12)\
**Post date:** [September 25, 2019, 6:30am UTC](https://forum.rasa.com/t/how-does-rasa-achieve-unit-conversion/17212/1 "2019-09-25T06:30:14Z")

</div>

I want to use rasa to achieve unit conversion.But now there are many units,like time,digital,length,mass,temperature,volume.And like the length unit has a lot, such as meters, kilometers, centimeters.There are many situations in combination.

How can I use rasa to quickly and efficiently achieve unit conversion? Please help me,Thanks a lot

---

<div class="post-metadata">

**Author:** ![Gehova](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Gehova](https://forum.rasa.com/u/Gehova)\
**Post date:** [September 25, 2019, 1:15pm UTC](https://forum.rasa.com/t/how-does-rasa-achieve-unit-conversion/17212/2 "2019-09-25T13:15:41Z")

</div>

Study a library like pint that already does unit conversion, see how it works and from there create custom actions for what you want to do. And you’re correct, there are a lot of units, you’ll need a big lookup table and a lot of synonyms tables, and something for extracting numbers, I’m not sure if a regex will be enough.
