Go to: LING 1330/2330 home page
Graphviz For Mac Sierra Download
Exercise 8: Getting to know foma |
Install foma, establish workflow Let's install foma. We will also establish a workflow that includes a workaround for the finicky 'view' command. Instructions below. Windows users- Download GraphViz zip file 'graphviz-2.44.1-win32.zip' from here, unzip it, then move the folder into C:Program Files (x86)
- Download Foma zip file 'foma-0.9.18_win32.zip' from here, unzip it, then move the folder into C:Program Files (x86)
- Add the two applications to system PATH. Here's how.
- In cmd, run foma. Create a regex. Instead of 'view', use: print dot > fst.txt (see workflow below)
- In another cmd, use command:
dot -Tpng -o fst.png fst.txt & start fst.png (see workflow below) - Your workflow should now be like this.
Mac usersFirst, check your OS X version. If it is 10.11 'El Capitan' or earlier, I recommend you upgrade your OS first. Alternatively, you can try the pre-compiled binary, but graphing won't work. Versions 10.12 'Sierra' and 10.13 'High Sierra': choose this option only if you have time, resource and patience. If not, try the next set of instructions for 'Mojave'. - You should have Xcode and homebrew installed on your system. It took me 1+ hour to install Xcode, just FYI.
- In Terminal, install GraphViz through homebrew along with its app: brew install graphviz --with-app
- You need to do some system-side housekeeping. See this stackoverflow post, the answer by Eliot with 33 votes.
- Install foma: brew install foma
- In Terminal, run foma. Create a regex. The 'view' command will work. (see workflow below)
- Your workflow will be like this (image from my WSL setup).
Version 10.14 'Mojave' (and later 'Catalina'): - Install homebrew, if you don't have it already
- In Terminal, install GraphViz through homebrew: brew install graphviz
- Install foma: brew install foma
- In Terminal, run foma. Create a regex. Instead of 'view', use: print dot > fst.txt (see workflow below)
- In another Terminal, use command:
dot -Tpng -o fst.png fst.txt ; open fst.png (see workflow below) - Your workflow should now be like this.
Linux usersInstall Graphviz and then foma. On Ubuntu, foma can be installed via apt install foma-bin. If your system knows how to handle .png files, 'view' will work from within foma. Your workflow will be like this (image from my WSL setup).
ExploreFollow the 'Getting started with foma' tutorial, listed under the 'Documentation' section in the foma home page. There are three exercises: turn your solution into a graph image, and paste them in a word-processed document. A few additional pointers:- Need to quit foma? Type in 'exit' followed by ENTER. That kicks you back into your command-line environment.
- Make sure to substitute the 'view' command with the 'print dot --> convert to png --> open image' routine above.
- Avoid going into the 'up' and 'down' modes, which can be hard to get out of (Ctrl+D usually works). Instead, supply a word argument with up and down: up buses, down bus[PL].
- + is a special regex symbol, so you will need to escape it.
- Defining a regular expression (def NAME REGEX ;) does not in fact push it onto the stack, which is necessary before you can test it out. For this, you should follow up with the push command, as in push NAME
- In fact, going the other way is more intuitive: first create a regular expression onto your stack through regex a|b|c|d ;, test it out, and when you are satisfied, give it a name through define. Screenshot here.
- Is your stack becoming too high? Use clear stack
- Having trouble? Check the 'Common mistakes' section at the bottom.
SUBMIT:- A word-processed document (MS Word) containing your FST graph images. PDF version is fine too.
|
|
Graphviz For Macos
If you want a GUI for Graphviz, there is one that's provided by Pixelglow. It uses its own built-in version of Graphviz, which is several years out-of-date. However, you can patch it so that it makes use of a newer Graphviz from one of my packages. To do this, downloadand install one of my Graphviz packages, then downloadGraphviz from Pixelglow. 在mac上安装graphviz时遇到的问题 今天在mac系统上安装graphviz时出现下面问题 执行命令brew install graphviz, 出现下. 元亨利贞o 阅读 6,275 评论 2 赞 2. Or, to enable graphviz support: brew install qcachegrind -with-graphviz What’s great about this program is that I successfully loaded a 6.1GB cachegrind file on my MacBook Pro! 2: Try the qcachegrind + Graphviz killer combo. It installs quickly via brew, which is nice. Check out these instructions, basically.