Remove the hard shell of the tamarind fruit. Simmer in a little liquid until the fruit flesh can be easily removed from the seeds. Chop the onion. Using a food processor gently mix the chopped onion, garlic, chili powder and salt. Once the onion is slightly crushed, add the tamarind pulp, curry leaves, coriander leaves and sugar. Grind till the onion is coarsely grinded.