Jython 2.7.2 comes bundled with the default installation of OpenRefine 3.4.1. You can add libraries and code by following this tutorial. A large number of Python files (
.pyc) are compatible.
Python code that depends on C bindings will not work in OpenRefine, which uses Java / Jython only. Since Jython is essentially Java, you can also import Java libraries and utilize those.
You will need to restart OpenRefine, so that new Jython or Python libraries are initialized during startup.
OpenRefine now has most of the Jsoup.org library built into GREL functions for parsing and working with HTML and XML elements.
Expressions in Jython must have a
Fields have to be accessed using the bracket operator rather than dot notation:
To return the lower case of
value (if the value is not null):
Full documentation on the Jython language can be found on its official site: http://www.jython.org.
Clojure 1.10.1 comes bundled with the default installation of OpenRefine 3.4.1. At this time, not all variables can be used with Clojure expressions: only
cells are available.
For example, functions can take the form
Or can look like
which functions like
value.split(" ") in GREL.
For help with syntax, see the Clojure website's guide to syntax.
User-contributed Clojure recipes can be found on our wiki at https://github.com/OpenRefine/OpenRefine/wiki/Recipes#11-clojure.
Full documentation on the Clojure language can be found on its official site: https://clojure.org/.