smaz-tools: import scoring code from tools/smaz