Sam Steingold
2012-07-25 04:09:00 UTC
Hi,
I am getting various macro errors:
<#macro sentiment scmr model><#if scmr??>
<#assign senti = "${scmr.results[model]}">
<#if senti??>
<td>${senti} ---- ${senti.sentimentType}</td>
<td>${senti.score?html}</td>
<#else><td align="center" colspan="2">none</td>
</#if>
</#if></#macro>
first error:
POSITIVE(1.0/1) ---- Expected hash. senti evaluated instead to freemarker.template.SimpleScalar
this is coming from "${senti} ---- ${senti.sentimentType}"
apparently, "senti" is the string representation of the object,
not the object itself.
how do I fix that?
second error:
Error executing macro: sentiment required parameter: scmr is not specified.
this is coming from this invocation:
<@sentiment model=model scmr=result.title/>
here `result' is non-null, but result.title is null.
I do check for that in the macro, but, apparently, it has to be done
outside. Why?
Thanks!
I am getting various macro errors:
<#macro sentiment scmr model><#if scmr??>
<#assign senti = "${scmr.results[model]}">
<#if senti??>
<td>${senti} ---- ${senti.sentimentType}</td>
<td>${senti.score?html}</td>
<#else><td align="center" colspan="2">none</td>
</#if>
</#if></#macro>
first error:
POSITIVE(1.0/1) ---- Expected hash. senti evaluated instead to freemarker.template.SimpleScalar
this is coming from "${senti} ---- ${senti.sentimentType}"
apparently, "senti" is the string representation of the object,
not the object itself.
how do I fix that?
second error:
Error executing macro: sentiment required parameter: scmr is not specified.
this is coming from this invocation:
<@sentiment model=model scmr=result.title/>
here `result' is non-null, but result.title is null.
I do check for that in the macro, but, apparently, it has to be done
outside. Why?
Thanks!
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://thereligionofpeace.com
http://pmw.org.il http://think-israel.org http://jihadwatch.org
Don't take life too seriously, you'll never get out of it alive!
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://thereligionofpeace.com
http://pmw.org.il http://think-israel.org http://jihadwatch.org
Don't take life too seriously, you'll never get out of it alive!