Hi

Am 02.08.2017 um 22:27 schrieb Tom Vacek:
> I'm running Ruta as an annotator in a more complex pipeline that
> interleaves Ruta steps and other annotators.
>
> I'm seeing some Ruta rules hang the engine.  I can fix bad rules manually,
> but a crash of the entire system is not acceptable.  Is there a way to put
> a time out on the rule application?  

No, not yet. Do you mean by time out something that actually measures
the time?
I do not have a good feeling about stopping a rule because it took too
long as there could be rules that just need more time, e.g., a rule that
calls several scripts or executes a java analysis engine. And I wouldn't
want to introduce exceptions on the kind of rules.

There is UIMA-5414 (Ruta: config param for max amount of rule and rule
element matches) which covers the same/similar problem.
I wasn't able to implement it for the current release, but it is near
the top of my priority list for the next release.

Would this solve your time out feature? Do you know the reason why the
rule took so long?

> Also, some rules are scoped at
> sentence or paragraph levels.  If there is a time out, it would be nice to
> contain the failure to its scope rather than have the entire document fail
> processing.

Ok, an additional configuration parameter would be possible in order to
determine what should happen: log if the rule stopped early or throw an
exception.

>
> I thought about implementing this by creating a special-use jcas on the
> desired scope, populating it with its annotations, calling the Ruta script
> on them in a sandbox, and then copying the annotations back out upon
> successful completion.  Any thoughts?

That sounds complicated and a lot of work, and maybe not applicable in
some use cases. I rather would solve this in ruta directly.

Best,

Peter

> Thanks,
>
> Tom
>

Reply via email to