Foma is a finite-state compiler that we will use to build descriptions of natural language morphology.
If possible, you also want the Graphviz package, which will help you visualize finite state automata created in Foma. This functionality is optional but very useful.
When you are working on one of the lab computers, you do not have to install anything. You should be able to run my copy of Foma there. Make sure that the path to my Foma is in your PATH variable, then you can invoke foma from the folder where your morphological project resides. You do not have to be physically present in the lab. You can access the lab computers remotely using ssh (for example, connect to u-pl1.ms.mff.cuni.cz).
/bin/bash
export PATH=${PATH}:~zeman/npfl094/lab-twolm/foma
which foma
/afs/ms/u/z/zeman/npfl094/lab-twolm/foma/foma
There are precompiled binaries of Foma for several operating systems. If one of them works for you, use it.
Unfortunately, the precompiled Linux binaries do not work on some systems. They require a shared library that may not be installed:
linux-x86_64/foma: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
If this is your case, try my copy instead. It is older but it works on my Ubuntu Linux on which the newer version fails with the above error.
wget http://ufal.mff.cuni.cz/~zeman/vyuka/morfosynt/lab-twolm/foma-dan.tar.gz tar xzf foma-dan.tar.gz export PATH=${PATH}:$(pwd)/foma
If your Linux is Ubuntu and you have superuser privileges, you can also use the package manager to install Foma and its dependencies. Before you do so, check whether your system already has Graphviz. If not, install it before Foma.
sudo apt install graphviz sudo apt install foma-bin
(echo ; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/XXXX/.zprofile eval "$(/usr/local/bin/brew shellenv)" brew install graphviz brew install foma
Credit: Many tips on this page come from Na Rae Han's installation instructions (see here).