20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stabler - Lx 185/209 2003<br />

(31) tcl/tk tree display <strong>on</strong> win32 systems (Windows 95, 98, NT, 2000)<br />

a. I went to http://dev.scriptics.com/s<strong>of</strong>tware/tcltk/download82.html and downloaded the<br />

install file tcl823.exe.<br />

Clicking <strong>on</strong> this, I let it unpack in the default directory, which was c:\Program Files\Tcl<br />

In c:\Program Files\Tcl\bin there is a program called: wish82.exe. I added c:\Program Files\Tcl\bin<br />

to my PATH.<br />

This is the program that I use to display trees from SWI Prolog.<br />

NB: If you install <strong>on</strong>e <strong>of</strong> the more recent versi<strong>on</strong>s <strong>of</strong> tcl/tk, they should still work. But to use them<br />

with our wish_tree predicate, you will have to (i) find out the name <strong>of</strong> your wish executable (the<br />

equivalent <strong>of</strong> our wish82.exe, and then (ii) replace occurrences <strong>of</strong> wish82.exe in wish_tree with<br />

that name.<br />

b. I installed swiprolog, and put the ic<strong>on</strong> for c:\Program Files\pl\bin\plwin.exe <strong>on</strong> my desktop.<br />

c. Clicking <strong>on</strong> this ic<strong>on</strong>, I set the properties <strong>of</strong> this program so that it would run in my prolog directory,<br />

which is c:\pl<br />

d. Then I downloaded all the win32 SWI-Prolog files from the webpage into my prolog directory, c:\pl<br />

e. Then, starting pl from the ic<strong>on</strong> <strong>on</strong> the desktop, I can execute<br />

?- [wish_tree.pl].<br />

?- wish_tree(a/[b/[],c/[]]).<br />

This draws a nice tree in a wish window.<br />

f. TODO: Really, we should provide a proper tk interface for SWI Prolog, or else an implementati<strong>on</strong> <strong>of</strong><br />

the tree display in XPCE. If any<strong>on</strong>e wants to do this, and succeeds, please share the fruits <strong>of</strong> your<br />

labor!<br />

50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!