WWW.DISSERTATION.XLIBX.INFO
FREE ELECTRONIC LIBRARY - Dissertations, online materials
 
<< HOME
CONTACTS



Pages:     | 1 |   ...   | 5 | 6 || 8 | 9 |   ...   | 29 |

«Creativity Support for Computational Literature By Daniel C. Howe A dissertation submitted in partial fulfillment of the requirements for the degree ...»

-- [ Page 7 ] --

Figure 8: A minimal HTML page as required for Java's AppletViewer.

The URL for this file must then be passed to the AppletViewer (via the command-line) before the program can be launched. While this process has been somewhat simplified in some integrated development environments (or IDEs), e.g., Eclipse or NetBeans, installing and configuring these IDEs has been notoriously difficult for new users who are easily overwhelmed by the sheer number of menus, windows, and options present in the interface.

As one student experienced with Java commented, RiTa is a great and really broad library that I used throughout the semester;

coming from experience with Swing and the Java Applet library, I was happily impressed with the simplicity of RiTa, and of Processing libraries in general. To be able to spend time on the algorithmic, structural, and creative parts of projects rather than tedious GUI creation is a satisfying and liberating thing. [PDAL Student, 2009] 2.5.1 Animation and ‘text behaviors’ Animation support in RiTa is provided by a combination of simple method calls (in the RiText object), and by the more flexible, but more complex, TextBehavior framework.

The basic methods in RiText, with a variety of convenient overloads, include the following:

riText.moveTo(x, y, startOffset, duration);

riText.moveBy(xOff, yOff, startOffset, duration);

riText.fadeOut(startOffset, duration);

riText.fadeIn(startOffset, duration);

riText.fadeColor(newColor, startOffset, duration);

riText.fadeToText(newText, startOffset, duration);

riText.scaleTo(newTextScale, startOffset, duration);

These methods, all of which were implemented using the TextBehavior architecture, were included to allow users easy access to the basic functionality required for simple display and manipulation of text. Further, users who were familiar with working via timelines (e.g., in Director or Flash) could use the optional “startOffset” parameter to “script” an entire text sequence, starting and stopping various behaviors for each RiText object at specific times offset from the start of the program. For finer-grained and/or more interactive control, RiTa employs a callback mechanism (see Events/Dynamic Callbacks below) through which programmers can be notified at various stages of a TextBehavior's execution. To provide the types of motion and interpolation required for “natural-looking” motion, 13 types of interpolation (or easing) were implemented: LINEAR, EASE_IN, EASE_OUT, EASE_IN_OUT, EASE_IN_OUT_CUBIC, EASE_IN_CUBIC, EASE_OUT_CUBIC, EASE_IN_OUT_QUARTIC, EASE_IN_QUARTIC, EASE_OUT_QUARTIC, EASE_IN_OUT_SINE, EASE_IN_SINE, EASE_OUT_SINE, any of which can be enabled at the object-level by a call to riText.setMotionType(type).

Lastly, new behaviors could be created via the TextBehavior mechanism and then applied to instances of RiText. An example of this was the scaleTo() method, which was originally implemented in a student project as a TextBehavior (to gradually grow or shrink at text—via affine transforms—to a specific size), and was later refactored and included as part of the core library.

2.5.2 Events and Dynamic Callbacks When creating an interactive program, it is often useful to know when certain events have started or finished. For example, one might want to move a RiText object to a particular location on screen, then, upon its arrival in the desired location, have its text contents spoken via a text-to-speech (or TTS) voice. To address this need, RiTa provided a “dynamic callback” mechanism that allowed users to handle such events in an intuitive fashion. The mechanism is “dynamic” because the programmer does not need to register interest in events, nor implement any interfaces (this is disallowed in the typical Processing sketch). Instead, because of the PApplet reference passed to the constructor of each RiObject, objects can attempt to dynamically invoke such methods back to their PApplet “parent”. If the method is not found on the first attempt to locate it (via Java's reflection API) in the parent, then it is not called again. If however, it does exist, then all subsequent events are passed in calls to that method. In early versions, each event type had its own callback signature, so that animation would trigger a method like onBehaviorCompleted(), while a speech events might trigger onSpeechCompleted(), and user text input (see the RiTextField method) would trigger onTextInput().

In the current implementation, this mechanism has been made more generic. Each of these events are of now of the same type, represented by the RiTaEvent class, and trigger the same method, onRiTaEvent(), inside which the type of the event can be queried. From anecdotal feedback, this solution has been preferable, as a single conditional or switch statement can be used rather than implementing new callback methods whenever new functionality is added. A typical implementation of the generic callback (for several

object/event types) might look like this:

–  –  –

… } } In most cases, however, as users are interested in one, or at most two such callbacks, such awkwardly long conditional blocks are not necessary.

2.5.3 Parameter and Return Types “Text needs to be a first-class object in these systems, and its representation is the most crucial part of the design.” – Pablo Gervas35 Early iterations of the RiTa toolkit implemented a hierarchical approach to text that restricted the types that could be passed to and returned by RiTa functions. Though such a hierarchical design, with Phrase objects containing Word objects, containing Syllable objects, containing Phoneme objects, had been used in several natural language libraries (Jet, FreeTTS, etc,), we eventually concluded that a simple string-based approach would offer a In conversation with Pablo Gervas at ‘The Electronic Literature Organization 2008’ conference held 29 May-1 June 2008, in Vancouver, Washington, USA range of advantages for this context. In fact, all of RiTa's functionality was eventually made accessible via primitives, strings, and string-arrays, a feature that greatly reduced the learning curve for new users. In addition to presenting a clean and consistent interface, the choice of arrays, rather than Vectors or Lists (to use Java terminology), shielded users from potentially confusing elements of the Java collections package, e.g., repeated castings, differing behavior of primitives and objects, the (belated) support for generics, and the rather convoluted mechanisms for converting back and forth between collections and arrays. Additionally knowledge of data structures (beyond the simple array) was not necessary.





This did create, however, some additional design complexity in those cases where the processing of hierarchically-oriented data was necessary. RiWordNet, for example, which provides access to the Princeton's WordNet lexical ontology is a case in point. The WordNet dictionary36 is comprised of a deeply nested tree-like structure of “pointers”. Typically, libraries for WordNet have returned these pointers directly, allowing users to manually navigate the range of objects – from senses and lemmas, to synsets and glosses, to examples and descriptions. RiWordNet was able to avoid such a hierarchical approach by augmenting the WordNet database with unique identifiers (generated at runtime) for each accessed lemma, or lexical entry. In raw form, WordNet only supplies pointers to sets of synonyms, or synsets, so navigating to a specific word (a combination of its sense and part-of-speech) was not possible without repeated navigation of pointer hierarchies. With RiTa's id mechanism however, users could access a word of interest multiple times, by repeatable passing of its unique identifier to whatever methods were needed. Thus each method call could return a smaller set of data and users were not required to manipulate or understand object types beyond simple Strings and String arrays.

See http://wordnet.princeton.edu/.

2.5.4 Lazy Instantiation and Caching To meet the design constraints on memory, browser-based execution, and performance, all object and data-loading in RiTa is performed (by default) in lazy fashion, if and as needed. Thus, the lexicon is not loaded (unless specified to the contrary) until a query is performed on it. Similarly, stemming, pluralization, conjugation, and letter-to-sound rules are only loaded when required for a specific method to complete. This allows RiTa to support a relatively large range of functionality with only those users who needed specific resources having to pay the cost for loading and using them. Similarly, most RiTa objects instantiate the RiCacheable interface and can optionally cache the results for a range of functional calls (often referred to as memoization).

An example of this functionality is the RiSearcher object, which computes a range of statistical metrics via calls to the Google search engine. Not only are such calls timeintensive, but they can accumulate and repeat, especially when one is testing new code. One such call allows users to obtain the “weighted bigram coherence” for a given sentence. As an example, we can consider a sentence S with n words {W1,W2...Wn}. Bigram coherence refers to the frequency that a pair of words (Wk,Wj) will occur sequentially in a given set of input texts (in this case, the entire web as indexed by the Google search engine), and is defined in RiTa as the number of occurrences (or frequency) for the quoted query "Wk Wj"

weighted against the sum of the queries for each individual word:

bigram-coherence(Wk, Wj) = count(Wk,Wj) / ((count(Wk) + count(Wj)) To obtain the bigram coherence for all n-1 pairs of consecutive words, (W1 + W2, W2 + W3... Wn-1 + Wn), we measure each pair individually, then weight the average of these

against the length of the sentence, represented by n:

avg-bigram-coherence(W1...Wn) =

–  –  –

Obtaining the average bigram coherence for the entire sentence thus requires two “single” calls to the search engine, for (count(Wk) and count(Wk+1), and one paired call (the “and” of the two words), but—and here the problem shows itself—half of these single calls will be duplicates of previous calls. In such cases, using a cache significantly increases the efficiency of the algorithm (especially as Google has recently taken to blocking repeated calls from the same IP address when not made not through the proprietary Google API). To make matters worse, it is common during development to make repeated calls for the same sentence or paragraph, thereby increasing the number of duplicate calls. Here, allowing the cache to persist across multiple runs of the program (as when using the RiTaServer described in the following section) provides yet further gains in efficiency.

2.5.6 Mixed-Mode Operation The RiTaServer mechanism provides an alternative client/server-based mode for RiTa objects that may have expensive initialization routines (e.g. building a large n-gram model from text files) or that may benefit from persistent caching (e.g., the RiSearcher object described above). Rather than incurring these costs each time the program is run (in development, for example, this may happen hundreds or even thousands of times), the server enables data stores to remain in memory while the program is stopped and started any number of times. This mechanism was added relatively late in the development of the toolkit, only after it became clear (see the section on Design Tensions) that certain use cases would continue to warrant the added complexity. There was also significant experimentation and iteration done to minimize the impact for users switching between these operation modes. In the current implementation, once the RiTaServer has been started, the user is required only to add one additional line of code to their program to switch processing to the remote server's virtual machine. All the same methods are supported remotely as are locally, and all local and remote object creation, marshaling of parameters and return types, and network communications, are handled transparently. The example below shows how a program using the RiMarkov object can switch the execution environment to the remote server by adding

this one line of code:

–  –  –

Beneath the surface, this additional line tells the RiMarkov object, which contains a reference to a MarkovModelIF interface, what concrete implementation (or delegate) to create and pass method calls to. In the remote case, instead of creating a concrete rita.support.MarkovModel object locally and delegating calls to it, a remote proxy object is created. On creation, the remote proxy sends a message to the RiTaServer to create the concrete MarkovModel in the remote virtual machine. An additional message may be sent containing mappings to the location of any external resources (e.g., “war_peace.txt” in the example above) that are required for the remote object's operation. Subsequently, all method calls to the RiMarkov object are transparently routed to the remote proxy, converted into remote messages, with parameters marshalled appropriately, and executed in the server. The server then handles un-marshalling of parameters and dispatch of the method call to the local object. Similarly, when the method call on the server object asynchronously completes, the returned results are marshalled and sent back over the network to the local RiMarkov's remote proxy object, which then returns them to the user code.

Here we see another design tension, specifically between the remote proxy design pattern [Gamma et al. 1995], and the manner in which objects are created in RiTa (see objectcreation above). In the typical implementation of this design pattern, the RiMarkov object would be an instance of an interface (or abstract class) and its concrete implementation would

be created via a factory method as follows:

RiMarkovIF rmi = RiMarkovFactory.create

–  –  –



Pages:     | 1 |   ...   | 5 | 6 || 8 | 9 |   ...   | 29 |


Similar works:

«Art and the Real-time Archive Relocation, Remix, Response Art and the Real-time Archive Relocation, Remix, Response David Crawford School of Photography Faculty of Fine, Applied and Performing Arts University of Gothenburg Thesis for the degree of Doctor of Philosophy in Digital Representation at the School of Photography, Faculty of Fine, Applied and Performing Arts, University of Gothenburg ArtMonitor series of publication from the Board for Artistic Research (NKU), the Faculty of Fine,...»

«Sharing Ancient Wisdoms: On Preparing a Digital Hyperedition of Greek Gnomic Collections Denis Searby T he practice of compiling collections of sayings by Greek wise men and philosophers, or gnomologia as they are properly called, began already in classical antiquity and continued throughout the centuries with increasing regularity into medieval times and beyond. Linguistically, the practice was not confined only to Greek, but it also flourished in other languages in whose culture Greek letters...»

«LANGUAGE SOCIALIZATION IN THE INTERNATIONALLY ADOPTIVE FAMILY: IDENTITIES, SECOND LANGUAGES, AND LEARNING A Dissertation Submitted to the Faculty of the Graduate School of Arts and Sciences of Georgetown University in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Linguistics By Evelyn Wright Fogle, M.A. Washington, DC May 7, 2009 Language socialization in the internationally adoptive family: Identities, second languages, and learning Evelyn Wright Fogle, M.A....»

«Reason and Intuitive Knowledge in Spinoza’s Ethics: Two Ways of Knowing, Two Ways of Living by Sanem Soyarslan Department of Philosophy Duke University Date: _Approved: _ Tad Schmaltz, Co-Supervisor David Wong, Co-Supervisor Michael Ferejohn Andrew Janiak Alan Nelson Dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Philosophy in the Graduate School of Duke University ABSTRACT Reason and Intuitive Knowledge in...»

«Loughborough University Institutional Repository Richard Hamilton a multi-elusive artist of the modern world? This item was submitted to Loughborough University's Institutional Repository by the/an author.Additional Information: • A Master's Thesis. Submitted in partial fullment of the requirements for the award of Master of Philosophy of Loughborough University. Volume 1 is available on open access and Volume 2 is closed access for copyright reasons. https://dspace.lboro.ac.uk/2134/8542...»

«The Role of Cation/Proton Exchange in Glutamate Transport into Synaptic Vesicles by Germaine Yen Lin Goh A dissertation submitted in partial satisfaction of the requirements for the degree of Joint Doctor of Philosophy with University of California, San Francisco in Bioengineering in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Robert H. Edwards, Chair Professor Terry E. Machen Professor Yang Dan Fall 2009 The Role of Cation/Proton Exchange in...»

«MARKETING INDOOR PLANTS AS AIR CLEANERS: A CHOICE-BASED CONJOINT ANALYSIS By ALEXIS ARMSTRONG SOLANO A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA © 2012 Alexis Armstrong Solano To my mother, father, and sister who supported me through everything, to Ledia for being there whenever I needed her, to Gabi, Trent, Jess, and Francesca for being great friends, to...»

«HEARING THE HILLSONG SOUND: MUSIC, MARKETING, MEANING AND BRANDED SPIRITUAL EXPERIENCE AT A TRANSNATIONAL MEGACHURCH Thomas J. Wagner A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy (Music) Royal Holloway University of London ii Declaration of Authorship I Thomas Wagner hereby declare that this thesis and the work presented in it is entirely my own. Where I have consulted the work of others, this is always clearly stated. Signed: Date:...»

«ARE THERE IRREDUCIBLY NORMATIVE PROPERTIES? Bart Streumer b.streumer@rug.nl Australasian Journal of Philosophy 86 (2008): 537-561 Published version available here: http://dx.doi.org/10.1080/00048400802215349 Abstract: Frank Jackson has argued that, given plausible claims about supervenience, descriptive predicates and property identity, there are no irreducibly normative properties. Philosophers who think that there are such properties have made several objections to this argument. In this...»

«AN Abstract OF THE DISSERTATION OF Edward B. Arnett for the degree of Doctor of Philosophy in Forest Science presented on February 15, 2007. Title: Presence, Relative Abundance, and Resource Selection of Bats in Managed Forest Landscapes in Western Oregon. Abstract approved:_ John P. Hayes I studied presence, relative abundance, and resource selection of bats in managed Douglas-fir (Pseudotsuga menziesii) forests in western Oregon from May through September, 1999–2001. Species richness was...»

«On (Non)Factivity, Clausal Complementation and the CP-Field A Dissertation Presented by Carlos Francisco de Cuba to The Graduate School in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy in Linguistics Stony Brook University August 2007 Stony Brook University The Graduate School Carlos Francisco de Cuba We, the dissertation committee for the above candidate for the Doctor of Philosophy degree, Hereby recommend acceptance of this dissertation Daniel L. Finer...»

«Phenomenology and the Cognitive Sciences 3: 287–313, 2004. C 2004 Kluwer Academic Publishers. Printed in the Netherlands. Real intentionality1 GALEN STRAWSON Department of Philosophy, University of Reading, Reading, UK (E-mail: gstrawson@mac.com) Abstract. Intentionality is an essentially mental, essentially occurrent, and essentially experiential (conscious) phenomenon. Any attempt to characterize a notion of intentionality that detaches it from conscious experience faces two insuperable...»





 
<<  HOME   |    CONTACTS
2016 www.dissertation.xlibx.info - Dissertations, online materials

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.