LING 408/508: Computational Techniques for Linguists

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Chapter 12 A display model Bjarne Stroustrup
Python Whats in a name? Snake logos and mascot notwithstanding, its named after Monty Pythons Flying Circus Humor-impaired can safely.
COMPUTERS: TOOLS FOR AN INFORMATION AGE Chapter 3 Operating Systems.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Chapters 12 and 13 A Display Model and Graphics Classes John Keyser’s Modifications of Slides by Bjarne Stroustrup
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Tcl and Tk Michael U. Ang. history and purpose How it started originally intended to be a reusable command language. After implementing several such.
1 Python Programming: An Introduction to Computer Science Chapter 3 Objects and Graphics.
How to install the Zelle graphics package
1 Lecture 3: Overview of UI Software and Tools Brad Myers Advanced User Interface Software.
Doxygen: Source Code Documentation Generator John Tully.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 16: Java Applets & AWT Fundamentals of Web Programming.
Slides adapted from: Bjarne Stroustrup, Programming – Principles and Practice using C++ Chapter 12 A display model Hartmut Kaiser
Tcl/Tk package in R Yichen Qin
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
ROOT Team Meeting October 1 st 2010 GUI thinking and testing ideas OpenGL GUI Root Team meeting 01/10/2010.
FLUKA GUI Status FLUKA Meeting CERN, 10/7/2006.
CSCE 121: Introduction to Program Design and Concepts Dr. J. Michael Moore Spring 2015 Set 12: A Display Model 1 Based on slides created by Bjarne.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
1 Lecture 2: Overview of UI Software and Tools Brad Myers Advanced User Interface Software.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
How the Session Works Outline Practical on arrival Talk 1 Reflect on practical Clarify concepts Practical exercises at your own pace Talk 2: Further concepts.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
Slides adapted from: Bjarne Stroustrup, Programming – Principles and Practice using C++ Chapter 12 A display model Hartmut Kaiser
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
TCL TK. Tcl/Tk C functions can become Tcl commands that are invoked interactively Tk = scriptable, portable user interface –Windows, X (Unix), MacOS,
LING 408/508: Programming for Linguists Lecture 23 November 25 th.
Documenting a function. Documenting a function definition We have a template for information that we need you to put at the top of each function - if.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 4 Objects and Graphics.
LING 408/508: Programming for Linguists Lecture 19 November 9 th.
Please open JCreator and follow these steps: 1)Configure  Options 2)JDK Tools 3)Choose Run Applet from drop-down 4)Click Default, then Edit 5)Click the.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
Allows the user and the computer to communicate with each other.
Chapter 5 Operating Systems.
Applications Active Web Documents Active Web Documents.
Python Programming Unit -1.
CST 1101 Problem Solving Using Computers
CSC227: Operating Systems
CS7026: Authoring for Digital Media HTML Authoring
MVC and other n-tier Architectures
Event Driven Programming Dick Steflik
Python: Simple Graphics and Event-driven Programming
Graphical User Interfaces (GUIs)
GUI Using Python.
This Week: Tkinter for GUI Interfaces Some examples
LING 581: Advanced Computational Linguistics
.NET Overview Yingcai Xiao.
Introduction to Algorithm Design
Java Applets.
What is Computer Software?
Introduction to Computer Software
Simple Graphics Package
Topics Graphical User Interfaces Using the tkinter Module
CMSC 331 Howdy, Ruby GUI !! Akshay Peshave
LING/C SC 581: Advanced Computational Linguistics
LING 408/508: Computational Techniques for Linguists
Graphics and FLTK CSCE 121 J. Michael Moore
Linux Professor Sabol.
Graphic Libraries for The User Interface
FEATURES OF PYTHON.
Web Application Development Using PHP
Presentation transcript:

LING 408/508: Computational Techniques for Linguists Lecture 24

Administrivia Reminder: project proposals!

Today's Topic Chapter 5 from the pythonbook: Objects and Graphics

graphics.py installation

Graphics Graphics is not usually part of a programming language However, html5 has canvas and svg built-in Traditionally: Graphics  Libraries and Toolkits Example: Tk (designed by John Ousterhout as an extension to Tcl) Tcl (Tool Command Language, also designed by John Ousterhout) Tk was originally built on top of the (portable) X11 client-server window system for Unix but has also been ported to native, e.g. OSX, platform graphics

Graphics Zelle uses Tk: Tkinter: import graphics.py Tkinter is Python's de-facto standard GUI (Graphical User Interface) package. It is a thin object-oriented layer on top of Tcl/Tk. http://infohost.nmt.edu/tcc/help/pubs/tkinter/tkinter.pdf

Tk Examples: https://www.tcl.tk/man/tcl8.5/TkCmd/contents.htm

Tcl A simple programming language:

Tcl/Tk on Mac OS X

Tcl/Tk on Ubuntu

Tcl/Tk on Ubuntu

Tcl/Tk Examples Command line: wish interpreter for tcl/tk Concepts: canvas place to draw coordinate system (0,0) topleft pack where to put canvas

graphics.py Point: Implemented as a rectangle:

graphics.py page 129

graphics.py Call method draw() once only

graphics.py Rectangle: .draw() Oval: .draw() Circle: .getRadius() Object inheritance (see graphics.py code): _Bbox: move Rectangle: .draw() Oval: .draw() Circle: .getRadius() Line: .draw(), .setArrow()

Directly in tcl/tk Stylistic variation… tk: uses plain x,y coordinates graphics.py: use primitive object Point tk: uses plain x,y coordinates