For the cookies: Preheat the oven to 350 degrees F.
In the bowl of an electric mixer fitted with the whisk attachment, cream the butter and sugar together until smooth and increased in volume, 5 to 8 minutes (alternatively, use a hand mixer). Add the almond extract.
Use a large strainer or sifter to sift together the flour, cornstarch, salt, and allspice. Remove the bowl from the mixer and use a spatula to mix in the dry ingredients. Stir until blended. Stir in the nuts.
Roll the dough into small balls and gently flatten them onto a baking sheet. They do not spread a lot, but leave some room in between them just in case. Bake in the oven until light brown, 8 to 10 minutes. Set aside to cool slightly before serving.
For the ice cream sandwiches: Preheat the oven to 350 degrees F.
Arrange the almonds in a single layer on a baking sheet. Place in the oven and cook until golden brown, 5 to 8 minutes. Remove from the oven and set aside to cool. (Alternatively, you can also brown the almonds in a large pan over medium-high heat).
Put the ice cream in a bowl and mash it with 2 wooden spoons so it softens up. Fold in the almonds and grated chocolate. Spread between 2 cookies.
If making ice cream sandwiches, make the cookies a little thicker and larger.
Recipe courtesy of Alex Guarnaschelli