Make a paste of all the ingredients that have to be ground.
Heat oil in a pan or pressure cooker. Fry all the flavoring ingredients.
Add the chopped onions and sauté till it turns golden brown.
Add the ground paste and sauté on a medium flame for 5-10 minutes till the masala turns dark green and the oil starts separating.
Add 3 cups of water, lemon juice and required salt. Bring it to a boil.
Add the soaked rice to this. Cover the or pan, reduce the flame and cook for 20-25 minutes. You can also transfer everything to a rice cooker and cook till the rice is done.
Switch off. Gently fluff up the rice and keep it covered for another 5-10 minutes.