Hi guys,

I encouter a problem when trying to use the memoryIntensiveNgrams in macro.
My code cannot run unless I remove "EXEC;" in [2]. It seems that we cannot
use EXEC inside macro. My pig version is 0.11.1.

[1]error message:
2013-08-01 14:43:00,266 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <file wikilink.pig, line 28> Failed to parse macro
'memoryIntensiveNgrams'. Reason: <file
/home/wei/develop/IdeaProjects/pignlproc/examples/macros/nerd_commons.pig,
line 7, column 4>  Syntax error, unexpected symbol at or near 'EXEC'
macro content:
    -- create ngrams that also are surface forms in the pairs bag

    allSurfaceForms = FOREACH pairs GENERATE
      surfaceForm;
    STORE allSurfaceForms INTO
'/home/wei/develop/IdeaProjects/pignlproc/sf_lookup/surfaceForms';
    EXEC;
    DEFINE ngramGenerator pignlproc.helpers.RestrictedNGramGenerator('5',
'/home/wei/develop/IdeaProjects/pignlproc/sf_lookup/surfaceForms', 'en_US');

[2]
https://github.com/dbpedia-spotlight/pignlproc/blob/master/examples/macros/nerd_commons.pig#l143


Best,
Zhiwei

Reply via email to