# 4dml **Repository Path**: ssb22/fourdml ## Basic Information - **Project Name**: 4dml - **Description**: 4DML transformation utility - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: http://ssb22.user.srcf.net/4dml - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-27 - **Last Updated**: 2026-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 4DML transformation utility =========================== From https://ssb22.user.srcf.net/4dml (also [mirrored on GitLab Pages](https://ssb22.gitlab.io/4dml) just in case) The 4DML transformation utility can be used for the rapid prototyping of complex structural transformations on data. It was intended to convert musical, technical or analytical notations from one form to another, but it has also been used to process data for report generation and social science research. “Rapid prototyping” means you can experiment with new ways of structuring your input, or new types of computer output, by making comparatively small changes to your transform specifications. 4DML can process both tree-like and matrix-like structures (in any number of dimensions), and supports multiple independent structures over the same data. There is an in-depth description of 4DML in my PhD thesis, which has been published as a technical report UCAM-CL-TR-591 ([PDF format](http://www.cl.cam.ac.uk/TechReports/UCAM-CL-TR-591.pdf)). There is also a [reference manual](python2/manual.md) in this repository. ## Rust version **It is now recommended to use the Rust version when possible.** The Rust conversion of the core 4DML functionality (minus the graphical testing interface, the Python introspection models and the now largely unnecessary parallel/distributed experiments) is in the `rust` directory of the repository, and also on `crates.io` so you should be able to install it with `cargo install fourdml` (package names cannot start with digits) The command line is simplified (CML vs CML-embedded etc is now auto-detected). See `4dml --help` for details. ## Earlier Python 2 version If you must use the earlier Python 2 version, you will need: * Python 2, preferably version 2.1+ * Expat (a library for parsing XML) if you want features like XML reading (in some distributions, this requires `python*-xmlbase` packages) * wxPython if you want to run the GUI * Psyco (optional, for speed improvements on Python 2.2) **For Unix and GNU/Linux** there is a script that installs the commands, ‘man’ pages, and ‘info’ pages. Run `cd python2; ./Install.sh` as root, and then the `4dml` command should be available. (If you don’t have root access, change the variables at the start of `Install.sh` to suit your directory structure.) **For other platforms** you can run Python on `main.py` with the appropriate command-line arguments (see reference manual, linked above).