Skip to content

module__org.bibliome.alvisnlp.modules.script.Script

Robert Bossy edited this page Jul 27, 2017 · 1 revision

#org.bibliome.alvisnlp.modules.script.Script

Synopsis

Runs a script.

This module is experimental.

Description

org.bibliome.alvisnlp.modules.script.Script reads, parses and runs script, a script in the language indicated by language. AlcisNLP supports all languages supported by the Java Scripting Engine in your system.

The script context will have a binding named alvisnlp to an object of type org.bibliome.alvisnlp.modules.script.HelperObject, the way this object fields and methods are accessed depends on the scripting language.

org.bibliome.alvisnlp.modules.script.Script gives access to the corpus elements methods, in particular creation methods. However, for creating elements we advise to use HelperObject's create* methods. One of the reasons is that elements created with these methods will have the constant features defined by constantDocumentFeatures, constantSectionFeatures, constantAnnotationFeatures, constantRelationFeatures and constantTupleFeatures.

Parameters stdin and stdout may not work on all systems.

Parameters

Optional

Type: String

The script to run (the source is inside the plan, not a path to a file).

Optional

Type: Mapping

Constant features to add to each annotation created by this module

Optional

Type: Mapping

Constant features to add to each document created by this module

Optional

Type: Mapping

Constant features to add to each relation created by this module

Optional

Type: Mapping

Constant features to add to each section created by this module

Optional

Type: Mapping

Constant features to add to each tuple created by this module

Default value: JavaScript

Type: String

The language of the script.

Clone this wiki locally