Make the spiced syrup: Put the ginger in a medium pot along with 2 cups water. Using a muddler, gently crush the ginger enough to break it up a bit. Bring the water to a boil.
Meanwhile, in a small skillet, toast the cinnamon and allspice until fragrant and warm, 2–3 minutes.
Add the toasted spices to the boiling ginger water and boil for about 5 minutes. Remove from the heat and let it steep for 15 minutes.
Add the sugar and stir until it has dissolved. Strain the syrup through a fine-mesh sieve into a large bottle or airtight container and store in the fridge until ready to use.
Make the drink: Remove the hard outer shells of the dried tamarind pods. Place the tamarind pulp and seeds in a medium pot and add 4 cups water.
Bring to a simmer over medium heat, then remove from the heat and let cool for 15 minutes.
Once it’s cooled, use your hands to mash the tamarind pulp in the cooking liquid, separating the pulp from the seeds. Discard all the seeds.
In a blender, combine the tamarind cooking liquid, tamarind pulp, lime juice, and Spiced Syrup and blend until smooth. Strain the liquid through a fine-mesh sieve into a 2-quart pitcher or airtight container. Add a pinch of salt, stir, and taste. Cover and store in the refrigerator until ready to use.
Pour into tall ice-filled glasses and garnish each with a cinnamon stick, or a star anise pod, or one of each.