A* shortest string decoding for non-idempotent semirings | Dark Hacker News