Multiline task descriptions

2 views
Skip to first unread message

Matthew Gardner

unread,
Jan 28, 2013, 1:23:49 PM1/28/13
to ducttap...@googlegroups.com
Two questions:

First, I have a task with a large number of parameters, such that it does not fit on one line in a terminal window.  I tried putting it on multiple lines, as follows:

task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@
                     mem=@ num_docs=@ output_dir=@ num_threads=@ {

Doing this gave me the following error:

ERROR: Missing opening { brace for task block.
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:6
                     mem=@ num_docs=@ output_dir=@ num_threads=@ {

I tried escaping the newline, just to see if it would work.  That produced this error:

ERROR: Illegal character at start of parameter variable name
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:5
task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@ \

If I put all of the variables on one line, it works (of course), but it's rather inconvenient for terminal editing.  Is there any way to let task definitions span multiple lines?

Second, is there a good place to go in the documentation for any similar questions I might have in the future?  Like a complete syntax description, or anything like that?

Nathan Schneider

unread,
Feb 4, 2013, 9:58:34 AM2/4/13
to Matthew Gardner, ducttap...@googlegroups.com
On Mon, Jan 28, 2013 at 1:23 PM, Matthew Gardner <m...@cs.cmu.edu> wrote:
Two questions:

First, I have a task with a large number of parameters, such that it does not fit on one line in a terminal window.  I tried putting it on multiple lines, as follows:

task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@
                     mem=@ num_docs=@ output_dir=@ num_threads=@ {

Doing this gave me the following error:

ERROR: Missing opening { brace for task block.
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:6
                     mem=@ num_docs=@ output_dir=@ num_threads=@ {

I tried escaping the newline, just to see if it would work.  That produced this error:

ERROR: Illegal character at start of parameter variable name
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:5
task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@ \

If I put all of the variables on one line, it works (of course), but it's rather inconvenient for terminal editing.  Is there any way to let task definitions span multiple lines?

I assume the answer is no, but let us know if you have discovered otherwise....
 
Second, is there a good place to go in the documentation for any similar questions I might have in the future?  Like a complete syntax description, or anything like that?

A syntax description sounds useful! But as far as I know the best solution right now is consulting examples + trial and error.

Nathan

Matthew Gardner

unread,
Feb 4, 2013, 10:05:11 AM2/4/13
to Nathan Schneider, ducttap...@googlegroups.com
On Mon, Feb 4, 2013 at 9:58 AM, Nathan Schneider <nat...@cmu.edu> wrote:
I assume the answer is no, but let us know if you have discovered otherwise....

A syntax description sounds useful! But as far as I know the best solution right now is consulting examples + trial and error.

Alright, then, where's the best place to document feature requests?  On the Google Code page? 

Nathan Schneider

unread,
Feb 4, 2013, 10:39:12 AM2/4/13
to Matthew Gardner, ducttap...@googlegroups.com
I don't know the official policy, but I would guess the GitHub issue tracker is the place for feature request: https://github.com/jhclark/ducttape/issues

For documentation issues with my Crash Course tutorial, you can use this issue tracker: https://github.com/nschneid/ducttape-crash-course/issues

Matthew Gardner

unread,
Feb 4, 2013, 10:44:43 AM2/4/13
to Nathan Schneider, ducttap...@googlegroups.com
Right, github, not google code.  I'll put some requests in there.


--
You received this message because you are subscribed to the Google Groups "ducttape-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ducttape-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jonathan Clark

unread,
Feb 4, 2013, 10:46:48 AM2/4/13
to Nathan Schneider, Matthew Gardner, ducttap...@googlegroups.com
Nathan: Adding github issues is indeed the official policy. :)


Greg Hanneman

unread,
Feb 4, 2013, 1:51:44 PM2/4/13
to Matthew Gardner, ducttap...@googlegroups.com
We have some (Jon-written) DuctTape tasks whose headers take up multiple lines.  They look like this:

task aTask : aPackage
    < src_in=$out@tok_src
    < tgt_in=$out@tok_tgt
    > src=src.gz
    > tgt=tgt.gz
    :: max_length=$filter_max_sent_len
    :: max_word_length=$filter_max_word_len {


So perhaps the trick is just to repeat the appropriate syntactic notation (<, >, or ::) on each line?  I'll second the idea that a quick guide to syntax would be a useful thing to have!

Greg.


--
You received this message because you are subscribed to the Google Groups "ducttape-users" group.
To unsubscribe from this group, send email to ducttape-user...@googlegroups.com.

Matthew Gardner

unread,
Feb 4, 2013, 4:25:27 PM2/4/13
to Greg Hanneman, ducttap...@googlegroups.com
Yes, Lane Schwartz responded to my ticket on the github issue tracker, giving this syntax as the way to make it work (https://github.com/jhclark/ducttape/issues/147).  I also filed a ticket requesting a syntax description.


To unsubscribe from this group and stop receiving emails from it, send an email to ducttape-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages