Place the lentils in a small saucepan and cover with plenty of water. Bring to the boil and cook for 15-17 minutes or until the lentils have softened but are still al dente. Drain and set aside
Peel the onions and slice them very thinly. Place on a wide plate and sprinkle with the flour and 1 tsp of salt and toss it through.
Heat the sunflower oil in a shallow, very wide frypan. Test the heat of the oil by placing a small piece of onion in the pan. If it floats to the top and sizzled immediately it is ready to go.
Reduce the heat to medium-high and carefully fry the onion in 2/3 batches. Fry each batch for 5-7 minutes, or until they are brown and crispy. Once cooked, use a slotted spoon to transfer them to a plate lined with paper towel and sprinkle with a bit more salt. Repeat until all the onion is cooked.
In a deeper, larger saucepan put in the cumin and coriander seeds. Over medium heat, toast the seeds for 1-2 minutes or until fragrant.
Then add the olive oil, basmati rice, turmeric, allspice, cinnamon, sugar, ½ tsp salt and a generous grind of pepper. Stir to coat the rice with the oil and toast for another 1-2 minutes.
Add the water and cooked lentils. Bring to a boil, cover with a lid and simmer over very low heat for 15 minutes.
Remove from the heat, lift off the lid and quickly cover the pan with a clean tea towel. Seal tightly with the lid and set aside for 10 minutes to steam.
Lastly, lift off the lid and tea towel and stir in half of the fried onions to the rice and lentils. Serve with the other half of onions sprinkled on top.