64 | Download ##library.name## version ##library.prettyVersion## in
65 | .zip format.
66 |
67 |
Installation
68 |
69 | Unzip and put the extracted ##project.name## folder into the libraries folder of your Processing sketches. Reference and examples are included in the ##project.name## folder.
70 |
71 |
72 |
73 |
74 |
75 |
Keywords. ##library.keywords##
76 |
Reference. Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.
77 |
Source. The source code of ##library.name## is available at ##source.host##, and its repository can be browsed here.
78 |
79 |
80 |
81 |
82 |
Examples
83 |
Find a list of examples in the current distribution of ##library.name##, or have a look at them by following the links below.
140 |
141 |
--------------------------------------------------------------------------------
/resources/build.properties:
--------------------------------------------------------------------------------
1 | # Create libraries for the Processing open source programming language and
2 | # environment (http://www.processing.org)
3 | #
4 | # Customize the build properties to make the ant-build-process work for your
5 | # environment. How? Please read the comments below.
6 | #
7 | # The default properties are set for OSX, for Windows-settings please refer to
8 | # comments made under (1) and (2).
9 |
10 |
11 |
12 | # (1)
13 | # Where is your Processing sketchbook located?
14 | # If you are not sure, check the sketchbook location in your Processing
15 | # application preferences.
16 | # ${user.home} points the compiler to your home directory.
17 | # For windows the default path to your sketchbook would be
18 | # ${user.home}/My Documents/Processing (make adjustments below).
19 |
20 | sketchbook.location=${user.home}/Coding/Processing/sketchbook
21 |
22 |
23 |
24 | # (2)
25 | # Where are the jar files located that are required for compiling your library
26 | # such as e.g. core.jar?
27 | # By default the local classpath location points to folder libs inside Eclipse's
28 | # workspace (by default found in your home directory).
29 | # For Windows the default path would be ${user.home}/workspace/libs (make
30 | # adjustments below).
31 |
32 | #classpath.local.location=${user.home}/Documents/workspace/libs
33 |
34 |
35 | # For OSX users.
36 | # The following path will direct you into Processing's application source code
37 | # folder in case you put Processing inside your Applications folder.
38 | # Uncommenting the line below will overwrite the classpath.local.location from
39 | # above.
40 |
41 | classpath.local.location=/Applications/Processing.app/Contents/Resources/Java/core/library/
42 |
43 |
44 | # Add all jar files that are required for compiling your project to the local
45 | # and project classpath, use a comma as delimiter. These jar files must be
46 | # inside your classpath.local.location folder.
47 |
48 | classpath.local.include=core.jar
49 |
50 |
51 | # Add processing's libraries folder to the classpath.
52 | # If you don't need to include the libraries folder to your classpath, comment
53 | # out the following line.
54 |
55 | classpath.libraries.location=${sketchbook.location}/libraries
56 |
57 |
58 |
59 | # (3)
60 | # Set the java version that should be used to compile your library.
61 |
62 | java.target.version=1.6
63 |
64 |
65 | # Set the description of the Ant build.xml file.
66 |
67 | ant.description=ProcessingLibs Ant build file.
68 |
69 |
70 |
71 | # (4)
72 | # Project details.
73 | # Give your library a name. The name must not contain spaces or special characters.
74 |
75 | project.name=Eliza
76 |
77 | # The name as the user will see it. This can contain spaces and special characters.
78 |
79 | project.prettyName=Eliza
80 |
81 |
82 | # Use 'normal' or 'fast' as value for project.compile.
83 | # 'fast' will only compile the project into your sketchbook.
84 | # 'normal' will compile the distribution including the javadoc-reference and all
85 | # web-files (the compile process here takes longer).
86 |
87 | project.compile=normal
88 |
89 | # All files compiled with project.compile=normal are stored
90 | # in the distribution folder.
91 |
92 |
93 |
94 | # (5)
95 | # The following items are properties that will be used to make changes to the
96 | # web document templates. Values of properties will be inserted into the
97 | # documents automatically.
98 | # If you need more control, you can edit web/index.html and
99 | # web/library.properties directly.
100 |
101 | author.name=Andres Colubri
102 | author.url=http://andrescolubri.net/
103 |
104 |
105 | # Set the web page for your library.
106 | # This is NOT a direct link to where to download it.
107 |
108 | library.url=http://processing.andrescolubri.net/libraries/eliza/
109 |
110 |
111 | # Set the category of your library. This must be one (or many) of the following:
112 | # "3D" "Animation" "Compilations" "Data"
113 | # "Fabrication" "Geometry" "GUI" "Hardware"
114 | # "I/O" "Language" "Math" "Simulation"
115 | # "Sound" "Utilities" "Typography" "Video & Vision"
116 | # If a value other than those listed is used, your library will listed as
117 | # "Other".
118 |
119 | library.category=Language
120 |
121 |
122 | # A short sentence (or fragment) to summarize the library's function. This will
123 | # be shown from inside the PDE when the library is being installed. Avoid
124 | # repeating the name of your library here. Also, avoid saying anything redundant
125 | # like mentioning that it's a library. This should start with a capitalized
126 | # letter, and end with a period.
127 |
128 | library.sentence=The classic Eliza psychologist program.
129 |
130 |
131 | # Additional information suitable for the Processing website. The value of
132 | # 'sentence' always will be prepended, so you should start by writing the
133 | # second sentence here. If your library only works on certain operating systems,
134 | # mention it here.
135 |
136 | library.paragraph=Based on the Java implementation by Charles Hayden, faithful to the original 1966 version.
137 |
138 |
139 | # Set the source code repository for your project.
140 | # Recommendations for storing your source code online are Google Code or GitHub.
141 |
142 | source.host=GitHub
143 | source.url=https://github.com/
144 | source.repository=https://github.com/codeanticode/eliza
145 |
146 |
147 | # The current version of your library.
148 | # This number must be parsable as an int. It increments once with each release.
149 | # This is used to compare different versions of the same library, and check if
150 | # an update is available.
151 |
152 | library.version=1
153 |
154 |
155 | # The version as the user will see it.
156 |
157 | library.prettyVersion=1.0
158 |
159 |
160 | library.copyright=(c) 2007-13
161 | library.dependencies=
162 | library.keywords=eliza, chatbot, AI, natural language
163 |
164 | tested.platform=osx, windows, linux
165 | tested.processingVersion=2.0.2
166 |
167 |
168 | # Include javadoc references into your project's javadocs.
169 |
170 | javadoc.java.href=http://java.sun.com/javase/6/docs/api/
171 | javadoc.processing.href=http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/
172 |
--------------------------------------------------------------------------------
/src/codeanticode/eliza/EString.java:
--------------------------------------------------------------------------------
1 | package codeanticode.eliza;
2 |
3 | /**
4 | * Eliza string functions.
5 | */
6 | public class EString {
7 |
8 | /** The digits. */
9 | static final String num = "0123456789";
10 |
11 | /**
12 | * Look for a match between the string and the pattern.
13 | * Return count of maching characters before * or #.
14 | * Return -1 if strings do not match.
15 | */
16 | public static int amatch(String str, String pat) {
17 | int count = 0;
18 | int i = 0; // march through str
19 | int j = 0; // march through pat
20 | while (i < str.length() && j < pat.length()) {
21 | char p = pat.charAt(j);
22 | // stop if pattern is * or #
23 | if (p == '*' || p == '#') return count;
24 | if (str.charAt(i) != p) return -1;
25 | // they are still equal
26 | i++; j++; count++;
27 | }
28 | return count;
29 | }
30 |
31 | /**
32 | * Search in successive positions of the string,
33 | * looking for a match to the pattern.
34 | * Return the string position in str of the match,
35 | * or -1 for no match.
36 | */
37 | public static int findPat(String str, String pat) {
38 | int count = 0;
39 | for (int i = 0; i < str.length(); i++) {
40 | if (amatch(str.substring(i), pat) >= 0)
41 | return count;
42 | count++;
43 | }
44 | return -1;
45 | }
46 |
47 | /**
48 | * Look for a number in the string.
49 | * Return the number of digits at the beginning.
50 | */
51 | public static int findNum(String str) {
52 | int count = 0;
53 | for (int i = 0; i < str.length(); i++) {
54 | if (num.indexOf(str.charAt(i)) == -1)
55 | return count;
56 | count++;
57 | }
58 | return count;
59 | }
60 |
61 | /**
62 | * Match the string against a pattern and fills in
63 | * matches array with the pieces that matched * and #
64 | */
65 | static boolean matchA(String str, String pat, String matches[]) {
66 | int i = 0; // move through str
67 | int j = 0; // move through matches
68 | int pos = 0; // move through pat
69 | while (pos < pat.length() && j < matches.length) {
70 | char p = pat.charAt(pos);
71 | if (p == '*') {
72 | int n;
73 | if (pos+1 == pat.length()) {
74 | // * is the last thing in pat
75 | // n is remaining string length
76 | n = str.length() - i;
77 | } else {
78 | // * is not last in pat
79 | // find using remaining pat
80 | n = findPat(str.substring(i), pat.substring(pos+1));
81 | }
82 | if (n < 0) return false;
83 | matches[j++] = str.substring(i, i+n);
84 | i += n; pos++;
85 | } else if (p == '#') {
86 | int n = findNum(str.substring(i));
87 | matches[j++] = str.substring(i, i+n);
88 | i += n; pos++;
89 | } else {
90 | int n = amatch(str.substring(i), pat.substring(pos));
91 | if (n <= 0) return false;
92 | i += n; pos += n;
93 | }
94 | }
95 | if (i >= str.length() && pos >= pat.length()) return true;
96 | return false;
97 | }
98 |
99 | /*
100 | * This version is clearer, but hopelessly slow
101 | */
102 | static boolean matchB(String strIn, String patIn, String matches[]) {
103 | String str = new String(strIn);
104 | String pat = new String(patIn);
105 | int j = 0; // move through matches
106 | while (pat.length() > 0 && str.length() >= 0 && j < matches.length) {
107 | char p = pat.charAt(0);
108 | if (p == '*') {
109 | int n;
110 | if (pat.length() == 1) {
111 | // * is the last thing in pat
112 | // n is remaining string length
113 | n = str.length();
114 | } else {
115 | // * is not last in pat
116 | // find using remaining pat
117 | n = findPat(str, pat.substring(1));
118 | }
119 | if (n < 0) return false;
120 | matches[j++] = str.substring(0, n);
121 | str = str.substring(n);
122 | pat = pat.substring(1);
123 | } else if (p == '#') {
124 | int n = findNum(str);
125 | matches[j++] = str.substring(0, n);
126 | str = str.substring(n);
127 | pat = pat.substring(1);
128 | // } else if (p == ' ' && str.length() > 0 && str.charAt(0) != ' ') {
129 | // pat = pat.substring(1);
130 | } else {
131 | int n = amatch(str, pat);
132 | if (n <= 0) return false;
133 | str = str.substring(n);
134 | pat = pat.substring(n);
135 | }
136 | }
137 | if (str.length() == 0 && pat.length() == 0) return true;
138 | return false;
139 | }
140 |
141 | public static boolean match(String str, String pat, String matches[]) {
142 | return matchA(str, pat, matches);
143 | }
144 |
145 | /*
146 | * Translates corresponding characters in src to dest.
147 | * Src and dest must have the same length.
148 | */
149 | public static String translate(String str, String src, String dest) {
150 | if (src.length() != dest.length()) {
151 | // impossible error
152 | }
153 | for (int i = 0; i < src.length(); i++) {
154 | str = str.replace(src.charAt(i), dest.charAt(i));
155 | }
156 | return str;
157 | }
158 |
159 | /**
160 | * Compresses its input by:
161 | * dropping space before space, comma, and period;
162 | * adding space before question, if char before is not a space; and
163 | * copying all others
164 | */
165 | public static String compress(String s) {
166 | String dest = "";
167 | if (s.length() == 0) return s;
168 | char c = s.charAt(0);
169 | for (int i = 1; i < s.length(); i++) {
170 | if (c == ' ' &&
171 | ((s.charAt(i) == ' ') ||
172 | (s.charAt(i) == ',') ||
173 | (s.charAt(i) == '.'))) {
174 | // nothing
175 | } else if (c != ' ' && s.charAt(i) == '?') {
176 | dest += c + " ";
177 | } else {
178 | dest += c;
179 | }
180 | c = s.charAt(i);
181 | }
182 | dest += c;
183 | return dest;
184 | }
185 |
186 | /**
187 | * Trim off leading space
188 | */
189 | public static String trim(String s) {
190 | for (int i = 0; i < s.length(); i++) {
191 | if (s.charAt(i) != ' ') return s.substring(i);
192 | }
193 | return "";
194 | }
195 |
196 | /**
197 | * Pad by ensuring there are spaces before and after the sentence.
198 | */
199 | public static String pad(String s) {
200 | if (s.length() == 0) return " ";
201 | char first = s.charAt(0);
202 | char last = s.charAt(s.length()-1);
203 | if (first == ' ' && last == ' ') return s;
204 | if (first == ' ' && last != ' ') return s + " ";
205 | if (first != ' ' && last == ' ') return " " + s;
206 | if (first != ' ' && last != ' ') return " " + s + " ";
207 | // impossible
208 | return s;
209 | }
210 |
211 | /**
212 | * Count number of occurrances of c in str
213 | */
214 | public static int count(String s, char c) {
215 | int count = 0;
216 | for (int i = 0; i < s.length(); i++)
217 | if (s.charAt(i) == c) count++;
218 | return count;
219 | }
220 | }
--------------------------------------------------------------------------------
/resources/code/ExampleTaglet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or
5 | * without modification, are permitted provided that the following
6 | * conditions are met:
7 | *
8 | * -Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | *
11 | * -Redistribution in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in
13 | * the documentation and/or other materials provided with the
14 | * distribution.
15 | *
16 | * Neither the name of Sun Microsystems, Inc. or the names of
17 | * contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * This software is provided "AS IS," without a warranty of any
21 | * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
22 | * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
23 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
24 | * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
25 | * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
26 | * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
27 | * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
28 | * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
29 | * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
30 | * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
31 | * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
32 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
33 | *
34 | * You acknowledge that Software is not designed, licensed or
35 | * intended for use in the design, construction, operation or
36 | * maintenance of any nuclear facility.
37 | */
38 |
39 | import com.sun.tools.doclets.Taglet;
40 | import com.sun.javadoc.*;
41 | import java.util.Map;
42 | import java.io.*;
43 | /**
44 | * A sample Taglet representing @example. This tag can be used in any kind of
45 | * {@link com.sun.javadoc.Doc}. It is not an inline tag. The text is displayed
46 | * in yellow to remind the developer to perform a task. For
47 | * example, "@example Hello" would be shown as:
48 | *
49 | *
50 | * To Do:
51 | *
Fix this!
52 | *
53 | *
54 | *
55 | * @author Jamie Ho
56 | * @since 1.4
57 | */
58 |
59 | public class ExampleTaglet implements Taglet {
60 |
61 | private static final String NAME = "example";
62 | private static final String HEADER = "example To Do:";
63 |
64 | /**
65 | * Return the name of this custom tag.
66 | */
67 | public String getName() {
68 | return NAME;
69 | }
70 |
71 | /**
72 | * Will return true since @example
73 | * can be used in field documentation.
74 | * @return true since @example
75 | * can be used in field documentation and false
76 | * otherwise.
77 | */
78 | public boolean inField() {
79 | return true;
80 | }
81 |
82 | /**
83 | * Will return true since @example
84 | * can be used in constructor documentation.
85 | * @return true since @example
86 | * can be used in constructor documentation and false
87 | * otherwise.
88 | */
89 | public boolean inConstructor() {
90 | return true;
91 | }
92 |
93 | /**
94 | * Will return true since @example
95 | * can be used in method documentation.
96 | * @return true since @example
97 | * can be used in method documentation and false
98 | * otherwise.
99 | */
100 | public boolean inMethod() {
101 | return true;
102 | }
103 |
104 | /**
105 | * Will return true since @example
106 | * can be used in method documentation.
107 | * @return true since @example
108 | * can be used in overview documentation and false
109 | * otherwise.
110 | */
111 | public boolean inOverview() {
112 | return true;
113 | }
114 |
115 | /**
116 | * Will return true since @example
117 | * can be used in package documentation.
118 | * @return true since @example
119 | * can be used in package documentation and false
120 | * otherwise.
121 | */
122 | public boolean inPackage() {
123 | return true;
124 | }
125 |
126 | /**
127 | * Will return true since @example
128 | * can be used in type documentation (classes or interfaces).
129 | * @return true since @example
130 | * can be used in type documentation and false
131 | * otherwise.
132 | */
133 | public boolean inType() {
134 | return true;
135 | }
136 |
137 | /**
138 | * Will return false since @example
139 | * is not an inline tag.
140 | * @return false since @example
141 | * is not an inline tag.
142 | */
143 |
144 | public boolean isInlineTag() {
145 | return false;
146 | }
147 |
148 | /**
149 | * Register this Taglet.
150 | * @param tagletMap the map to register this tag to.
151 | */
152 | public static void register(Map tagletMap) {
153 | ExampleTaglet tag = new ExampleTaglet();
154 | Taglet t = (Taglet) tagletMap.get(tag.getName());
155 | if (t != null) {
156 | tagletMap.remove(tag.getName());
157 | }
158 | tagletMap.put(tag.getName(), tag);
159 | }
160 |
161 | /**
162 | * Given the Tag representation of this custom
163 | * tag, return its string representation.
164 | * @param tag the Tag representation of this custom tag.
165 | */
166 | public String toString(Tag tag) {
167 | return createHTML(readFile(tag.text()));
168 | }
169 |
170 |
171 | /**
172 | * Given an array of Tags representing this custom
173 | * tag, return its string representation.
174 | * @param tags the array of Tags representing of this custom tag.
175 | */
176 | public String toString(Tag[] tags) {
177 | if (tags.length == 0) {
178 | return null;
179 | }
180 | return createHTML(readFile(tags[0].text()));
181 | }
182 |
183 |
184 |
185 | String createHTML(String theString) {
186 | if(theString!=null) {
187 | String dd = "";
193 |
194 | return dd+"\n
" +
195 | "
+Example
" +
196 | "
"+theString+"
" +
197 | "
";
198 | }
199 | return "";
200 | }
201 |
202 |
203 | /**
204 | * check if the examples directory exists and return the example as given in the tag.
205 | * @param theExample the name of the example
206 | */
207 | String readFile(String theExample) {
208 | String record = "";
209 | String myResult = "";
210 | int recCount = 0;
211 | String myDir = "../examples";
212 | File file=new File(myDir);
213 | if(file.exists()==false) {
214 | myDir = "./examples";
215 | }
216 | try {
217 | FileReader fr = new FileReader(myDir+"/"+theExample+"/"+theExample+".pde");
218 | BufferedReader br = new BufferedReader(fr);
219 | record = new String();
220 | while ((record = br.readLine()) != null) {
221 | myResult += record+"\n";
222 | }
223 | } catch (IOException e) {
224 | System.out.println(e);
225 | return null;
226 | }
227 | return myResult;
228 | }
229 | }
230 |
231 |
232 |
--------------------------------------------------------------------------------
/src/codeanticode/eliza/Eliza.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Eliza
3 | * Author: Charles Hayden
4 | * http://www.chayden.net/eliza/Eliza.html
5 | * Modified by Andres Colubri to use it as a Processing library
6 | */
7 |
8 | package codeanticode.eliza;
9 |
10 | import processing.core.*;
11 |
12 | /**
13 | * Eliza main class.
14 | * Stores the processed script.
15 | * Does the input transformations.
16 | */
17 | public class Eliza {
18 | public Eliza(PApplet parent) {
19 | this.parent = parent;
20 |
21 | readDefaultScript();
22 | }
23 |
24 | public void dispose() {
25 | // anything in here will be called automatically when
26 | // the parent applet shuts down. for instance, this might
27 | // shut down a thread used by this library.
28 | // note that this currently has issues, see bug #183
29 | // http://dev.processing.org/bugs/show_bug.cgi?id=183
30 | }
31 |
32 | public boolean finished() {
33 | return finished;
34 | }
35 |
36 | /**
37 | * Process a line of script input.
38 | */
39 | public void collect(String s) {
40 | String lines[] = new String[4];
41 |
42 | if (EString.match(s, "*reasmb: *", lines)) {
43 | if (lastReasemb == null) {
44 | System.out.println("Error: no last reasemb");
45 | return;
46 | }
47 | lastReasemb.add(lines[1]);
48 | }
49 | else if (EString.match(s, "*decomp: *", lines)) {
50 | if (lastDecomp == null) {
51 | System.out.println("Error: no last decomp");
52 | return;
53 | }
54 | lastReasemb = new ReasembList();
55 | String temp = new String(lines[1]);
56 | if (EString.match(temp, "$ *", lines)) {
57 | lastDecomp.add(lines[0], true, lastReasemb);
58 | } else {
59 | lastDecomp.add(temp, false, lastReasemb);
60 | }
61 | }
62 | else if (EString.match(s, "*key: * #*", lines)) {
63 | lastDecomp = new DecompList();
64 | lastReasemb = null;
65 | int n = 0;
66 | if (lines[2].length() != 0) {
67 | try {
68 | n = Integer.parseInt(lines[2]);
69 | } catch (NumberFormatException e) {
70 | System.out.println("Number is wrong in key: " + lines[2]);
71 | }
72 | }
73 | keys.add(lines[1], n, lastDecomp);
74 | }
75 | else if (EString.match(s, "*key: *", lines)) {
76 | lastDecomp = new DecompList();
77 | lastReasemb = null;
78 | keys.add(lines[1], 0, lastDecomp);
79 | }
80 | else if (EString.match(s, "*synon: * *", lines)) {
81 | WordList words = new WordList();
82 | words.add(lines[1]);
83 | s = lines[2];
84 | while (EString.match(s, "* *", lines)) {
85 | words.add(lines[0]);
86 | s = lines[1];
87 | }
88 | words.add(s);
89 | syns.add(words);
90 | }
91 | else if (EString.match(s, "*pre: * *", lines)) {
92 | pre.add(lines[1], lines[2]);
93 | }
94 | else if (EString.match(s, "*post: * *", lines)) {
95 | post.add(lines[1], lines[2]);
96 | }
97 | else if (EString.match(s, "*initial: *", lines)) {
98 | initial = lines[1];
99 | }
100 | else if (EString.match(s, "*final: *", lines)) {
101 | finl = lines[1];
102 | }
103 | else if (EString.match(s, "*quit: *", lines)) {
104 | quit.add(" " + lines[1]+ " ");
105 | }
106 | else {
107 | System.out.println("Unrecognized input: " + s);
108 | }
109 | }
110 |
111 | /**
112 | * Print the stored script.
113 | */
114 | public void print() {
115 | if (printKeys) keys.print(0);
116 | if (printSyns) syns.print(0);
117 | if (printPrePost) {
118 | pre.print(0);
119 | post.print(0);
120 | }
121 | if (printInitialFinal) {
122 | System.out.println("initial: " + initial);
123 | System.out.println("final: " + finl);
124 | quit.print(0);
125 | quit.print(0);
126 | }
127 | }
128 |
129 | /**
130 | * Process a line of input.
131 | */
132 | public String processInput(String s) {
133 | String reply;
134 | // Do some input transformations first.
135 | s = EString.translate(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
136 | "abcdefghijklmnopqrstuvwxyz");
137 | s = EString.translate(s, "@#$%^&*()_-+=~`{[}]|:;<>\\\"",
138 | " " );
139 | s = EString.translate(s, ",?!", "...");
140 | // Compress out multiple speace.
141 | s = EString.compress(s);
142 | String lines[] = new String[2];
143 | // Break apart sentences, and do each separately.
144 | while (EString.match(s, "*.*", lines)) {
145 | reply = sentence(lines[0]);
146 | if (reply != null) return reply;
147 | s = EString.trim(lines[1]);
148 | }
149 | if (s.length() != 0) {
150 | reply = sentence(s);
151 | if (reply != null) return reply;
152 | }
153 | // Nothing matched, so try memory.
154 | String m = mem.get();
155 | if (m != null) return m;
156 |
157 | // No memory, reply with xnone.
158 | Key key = keys.getKey("xnone");
159 | if (key != null) {
160 | Key dummy = null;
161 | reply = decompose(key, s, dummy);
162 | if (reply != null) return reply;
163 | }
164 | // No xnone, just say anything.
165 | return "I am at a loss for words.";
166 | }
167 |
168 | public boolean readDefaultScript() {
169 | clearScript();
170 |
171 | /*
172 | // Returns the URL of the resource file inside the location in the jar
173 | // where the class file for Eliza is stored. More info about this here:
174 | // http://www.javaworld.com/javaworld/javaqa/2002-11/02-qa-1122-resources.html
175 | if (url != null)
176 | {
177 | String[] lines = parent.loadStrings(url.toString());
178 | for (int i = 0; i < lines.length; i++) {
179 | collect(lines[i]);
180 | }
181 | }
182 | else System.err.println("Cannot load default Eliza script!");
183 | */
184 |
185 | /*
186 | String[] lines = parent.loadStrings("eliza.script");
187 | if (lines.length == 0) {
188 | System.err.println("Cannot load default Eliza script!");
189 | return false;
190 | } else {
191 | for (int i = 0; i < lines.length; i++) {
192 | collect(lines[i]);
193 | }
194 | return true;
195 | }
196 | */
197 |
198 | return readScript("eliza.script");
199 | }
200 |
201 | public boolean readScript(String script) {
202 | clearScript();
203 |
204 | String[] lines = parent.loadStrings(script);
205 | if (lines == null || lines.length == 0) {
206 | System.err.println("Cannot load Eliza script!");
207 | return false;
208 | } else {
209 | for (int i = 0; i < lines.length; i++) {
210 | collect(lines[i]);
211 | }
212 | return true;
213 | }
214 |
215 |
216 | /*
217 | InputStream stream = parent.openStream(script);
218 | if (stream == null) {
219 | System.err.println("The script \"" + script + "\" " +
220 | "is missing or inaccessible, make sure " +
221 | "the URL is valid or that the file has been " +
222 | "added to your sketch and is readable.");
223 | return 1;
224 | }
225 |
226 | BufferedReader in = new BufferedReader(new InputStreamReader(stream));
227 |
228 | String s;
229 | while (true) {
230 | try {
231 | s = in.readLine();
232 | } catch (IOException e) {
233 | System.err.println("Could not read line from script file.");
234 | return 1;
235 | }
236 | if (s == null) break;
237 | collect(s);
238 | if (echoInput) System.out.println(s);
239 | }
240 |
241 | if (printData) print();
242 | return 0;
243 | */
244 | }
245 |
246 | void clearScript() {
247 | keys.clear();
248 | syns.clear();
249 | pre.clear();
250 | post.clear();
251 | initial = "";
252 | finl = "";
253 | quit.clear();
254 | keyStack.reset();
255 | }
256 |
257 | /**
258 | * Process a sentence.
259 | * (1) Make pre transformations.
260 | * (2) Check for quit word.
261 | * (3) Scan sentence for keys, build key stack.
262 | * (4) Try decompositions for each key.
263 | */
264 | String sentence(String s) {
265 | s = pre.translate(s);
266 | s = EString.pad(s);
267 | if (quit.find(s)) {
268 | finished = true;
269 | return finl;
270 | }
271 | keys.buildKeyStack(keyStack, s);
272 | for (int i = 0; i < keyStack.keyTop(); i++) {
273 | Key gotoKey = new Key();
274 | String reply = decompose(keyStack.key(i), s, gotoKey);
275 | if (reply != null) return reply;
276 | // If decomposition returned gotoKey, try it
277 | while (gotoKey.key() != null) {
278 | reply = decompose(gotoKey, s, gotoKey);
279 | if (reply != null) return reply;
280 | }
281 | }
282 | return null;
283 | }
284 |
285 | /**
286 | * Decompose a string according to the given key.
287 | * Try each decomposition rule in order.
288 | * If it matches, assemble a reply and return it.
289 | * If assembly fails, try another decomposition rule.
290 | * If assembly is a goto rule, return null and give the key.
291 | * If assembly succeeds, return the reply;
292 | */
293 | String decompose(Key key, String s, Key gotoKey) {
294 | String reply[] = new String[10];
295 | for (int i = 0; i < key.decomp().size(); i++) {
296 | Decomp d = (Decomp)key.decomp().elementAt(i);
297 | String pat = d.pattern();
298 | if (syns.matchDecomp(s, pat, reply)) {
299 | String rep = assemble(d, reply, gotoKey);
300 | if (rep != null) return rep;
301 | if (gotoKey.key() != null) return null;
302 | }
303 | }
304 | return null;
305 | }
306 |
307 | /**
308 | * Assembly a reply from a decomp rule and the input.
309 | * If the reassembly rule is goto, return null and give
310 | * the gotoKey to use.
311 | * Otherwise return the response.
312 | */
313 | String assemble(Decomp d, String reply[], Key gotoKey) {
314 | String lines[] = new String[3];
315 | d.stepRule();
316 | String rule = d.nextRule();
317 | if (EString.match(rule, "goto *", lines)) {
318 | // goto rule -- set gotoKey and return false.
319 | gotoKey.copy(keys.getKey(lines[0]));
320 | if (gotoKey.key() != null) return null;
321 | System.out.println("Goto rule did not match key: " + lines[0]);
322 | return null;
323 | }
324 | String work = "";
325 | while (EString.match(rule, "* (#)*", lines)) {
326 | // reassembly rule with number substitution
327 | rule = lines[2]; // there might be more
328 | int n = 0;
329 | try {
330 | n = Integer.parseInt(lines[1]) - 1;
331 | } catch (NumberFormatException e) {
332 | System.out.println("Number is wrong in reassembly rule " + lines[1]);
333 | }
334 | if (n < 0 || n >= reply.length) {
335 | System.out.println("Substitution number is bad " + lines[1]);
336 | return null;
337 | }
338 | reply[n] = post.translate(reply[n]);
339 | work += lines[0] + " " + reply[n];
340 | }
341 | work += rule;
342 | if (d.mem()) {
343 | mem.save(work);
344 | return null;
345 | }
346 | return work;
347 | }
348 |
349 | PApplet parent;
350 |
351 | final boolean echoInput = false;
352 | final boolean printData = false;
353 |
354 | final boolean printKeys = false;
355 | final boolean printSyns = false;
356 | final boolean printPrePost = false;
357 | final boolean printInitialFinal = false;
358 |
359 | /** The key list */
360 | KeyList keys = new KeyList();
361 | /** The syn list */
362 | SynList syns = new SynList();
363 | /** The pre list */
364 | PrePostList pre = new PrePostList();
365 | /** The post list */
366 | PrePostList post = new PrePostList();
367 | /** Initial string */
368 | String initial = "Hello.";
369 | /** Final string */
370 | String finl = "Goodbye.";
371 | /** Quit list */
372 | WordList quit = new WordList();
373 |
374 | /** Key stack */
375 | KeyStack keyStack = new KeyStack();
376 |
377 | /** Memory */
378 | Mem mem = new Mem();
379 |
380 | DecompList lastDecomp;
381 | ReasembList lastReasemb;
382 | boolean finished = false;
383 |
384 | static final int success = 0;
385 | static final int failure = 1;
386 | static final int gotoRule = 2;
387 | }
388 |
--------------------------------------------------------------------------------
/data/eliza.script:
--------------------------------------------------------------------------------
1 | initial: How do you do. Please tell me your problem.
2 | final: Goodbye. Thank you for talking to me.
3 | quit: bye
4 | quit: goodbye
5 | quit: quit
6 | pre: dont don't
7 | pre: cant can't
8 | pre: wont won't
9 | pre: recollect remember
10 | pre: dreamt dreamed
11 | pre: dreams dream
12 | pre: maybe perhaps
13 | pre: how what
14 | pre: when what
15 | pre: certainly yes
16 | pre: machine computer
17 | pre: computers computer
18 | pre: were was
19 | pre: you're you are
20 | pre: i'm i am
21 | pre: same alike
22 | post: am are
23 | post: your my
24 | post: me you
25 | post: myself yourself
26 | post: yourself myself
27 | post: i you
28 | post: you I
29 | post: my your
30 | post: i'm you are
31 | synon: belief feel think believe wish
32 | synon: family mother mom father dad sister brother wife children child
33 | synon: desire want need
34 | synon: sad unhappy depressed sick
35 | synon: happy elated glad better
36 | synon: cannot can't
37 | synon: everyone everybody nobody noone
38 | synon: be am is are was
39 | key: xnone
40 | decomp: *
41 | reasmb: I'm not sure I understand you fully.
42 | reasmb: Please go on.
43 | reasmb: What does that suggest to you ?
44 | reasmb: Do you feel strongly about discussing such things ?
45 | key: sorry
46 | decomp: *
47 | reasmb: Please don't apologise.
48 | reasmb: Apologies are not necessary.
49 | reasmb: I've told you that apologies are not required.
50 | key: apologise
51 | decomp: *
52 | reasmb: goto sorry
53 | key: remember 5
54 | decomp: * i remember *
55 | reasmb: Do you often think of (2) ?
56 | reasmb: Does thinking of (2) bring anything else to mind ?
57 | reasmb: What else do you recollect ?
58 | reasmb: Why do you recollect (2) just now ?
59 | reasmb: What in the present situation reminds you of (2) ?
60 | reasmb: What is the connection between me and (2) ?
61 | decomp: * do you remember *
62 | reasmb: Did you think I would forget (2) ?
63 | reasmb: Why do you think I should recall (2) now ?
64 | reasmb: What about (2) ?
65 | reasmb: goto what
66 | reasmb: You mentioned (2) ?
67 | key: if 3
68 | decomp: * if *
69 | reasmb: Do you think its likely that (2) ?
70 | reasmb: Do you wish that (2) ?
71 | reasmb: What do you know about (2) ?
72 | reasmb: Really, if (2) ?
73 | key: dreamed 4
74 | decomp: * i dreamed *
75 | reasmb: Really, (2) ?
76 | reasmb: Have you ever fantasized (2) while you were awake ?
77 | reasmb: Have you ever dreamed (2) before ?
78 | reasmb: goto dream
79 | key: dream 3
80 | decomp: *
81 | reasmb: What does that dream suggest to you ?
82 | reasmb: Do you dream often ?
83 | reasmb: What persons appear in your dreams ?
84 | reasmb: Do you believe that dreams have something to do with your problems ?
85 | key: perhaps
86 | decomp: *
87 | reasmb: You don't seem quite certain.
88 | reasmb: Why the uncertain tone ?
89 | reasmb: Can't you be more positive ?
90 | reasmb: You aren't sure ?
91 | reasmb: Don't you know ?
92 | key: name 15
93 | decomp: *
94 | reasmb: I am not interested in names.
95 | reasmb: I've told you before, I don't care about names -- please continue.
96 | key: deutsch
97 | decomp: *
98 | reasmb: goto xforeign
99 | reasmb: I told you before, I don't understand German.
100 | key: francais
101 | decomp: *
102 | reasmb: goto xforeign
103 | reasmb: I told you before, I don't understand French.
104 | key: italiano
105 | decomp: *
106 | reasmb: goto xforeign
107 | reasmb: I told you before, I don't understand Italian.
108 | key: espanol
109 | decomp: *
110 | reasmb: goto xforeign
111 | reasmb: I told you before, I don't understand Spanish.
112 | key: xforeign
113 | decomp: *
114 | reasmb: I speak only English.
115 | key: hello
116 | decomp: *
117 | reasmb: How do you do. Please state your problem.
118 | reasmb: Hi. What seems to be your problem ?
119 | key: computer 50
120 | decomp: *
121 | reasmb: Do computers worry you ?
122 | reasmb: Why do you mention computers ?
123 | reasmb: What do you think machines have to do with your problem ?
124 | reasmb: Don't you think computers can help people ?
125 | reasmb: What about machines worrys you ?
126 | reasmb: What do you think about machines ?
127 | key: am
128 | decomp: * am i *
129 | reasmb: Do you believe you are (2) ?
130 | reasmb: Would you want to be (2) ?
131 | reasmb: Do you wish I would tell you you are (2) ?
132 | reasmb: What would it mean if you were (2) ?
133 | reasmb: goto what
134 | decomp: *
135 | reasmb: Why do you say 'am' ?
136 | reasmb: I don't understand that.
137 | key: are
138 | decomp: * are you *
139 | reasmb: Why are you interested in whether I am (2) or not ?
140 | reasmb: Would you prefer if I weren't (2) ?
141 | reasmb: Perhaps I am (2) in your fantasies.
142 | reasmb: Do you sometimes think I am (2) ?
143 | reasmb: goto what
144 | decomp: * are *
145 | reasmb: Did you think they might not be (2) ?
146 | reasmb: Would you like it if they were not (2) ?
147 | reasmb: What if they were not (2) ?
148 | reasmb: Possibly they are (2).
149 | key: your
150 | decomp: * your *
151 | reasmb: Why are you concerned over my (2) ?
152 | reasmb: What about your own (2) ?
153 | reasmb: Are you worried about someone else's (2) ?
154 | reasmb: Really, my (2) ?
155 | key: was 2
156 | decomp: * was i *
157 | reasmb: What if you were (2) ?
158 | reasmb: Do you think you were (2) ?
159 | reasmb: Were you (2) ?
160 | reasmb: What would it mean if you were (2) ?
161 | reasmb: What does (2) suggest to you ?
162 | reasmb: goto what
163 | decomp: * i was *
164 | reasmb: Were you really ?
165 | reasmb: Why do you tell me you were (2) now ?
166 | reasmb: Perhaps I already know you were (2).
167 | decomp: * was you *
168 | reasmb: Would you like to believe I was (2) ?
169 | reasmb: What suggests that I was (2) ?
170 | reasmb: What do you think ?
171 | reasmb: Perhaps I was (2).
172 | reasmb: What if I had been (2) ?
173 | key: i
174 | decomp: * i @desire *
175 | reasmb: What would it mean to you if you got (3) ?
176 | reasmb: Why do you want (3) ?
177 | reasmb: Suppose you got (3) soon ?
178 | reasmb: What if you never got (3) ?
179 | reasmb: What would getting (3) mean to you ?
180 | reasmb: What does wanting (3) have to do with this discussion ?
181 | decomp: * i am* @sad *
182 | reasmb: I am sorry to hear that you are (3).
183 | reasmb: Do you think that coming here will help you not to be (3) ?
184 | reasmb: I'm sure it's not pleasant to be (3).
185 | reasmb: Can you explain what made you (3) ?
186 | decomp: * i am* @happy *
187 | reasmb: How have I helped you to be (3) ?
188 | reasmb: Has your treatment made you (3) ?
189 | reasmb: What makes you (3) just now ?
190 | reasmb: Can you explan why you are suddenly (3) ?
191 | decomp: * i was *
192 | reasmb: goto was
193 | decomp: * i @belief * i *
194 | reasmb: Do you really think so ?
195 | reasmb: But you are not sure you (3).
196 | reasmb: Do you really doubt you (3) ?
197 | decomp: * i* @belief *you *
198 | reasmb: goto you
199 | decomp: * i am *
200 | reasmb: Is it because you are (2) that you came to me ?
201 | reasmb: How long have you been (2) ?
202 | reasmb: Do you believe it is normal to be (2) ?
203 | reasmb: Do you enjoy being (2) ?
204 | decomp: * i @cannot *
205 | reasmb: How do you think that you can't (3) ?
206 | reasmb: Have you tried ?
207 | reasmb: Perhaps you could (3) now.
208 | reasmb: Do you really want to be able to (3) ?
209 | decomp: * i don't *
210 | reasmb: Don't you really (2) ?
211 | reasmb: Why don't you (2) ?
212 | reasmb: Do you wish to be able to (2) ?
213 | reasmb: Does that trouble you ?
214 | decomp: * do i feel *
215 | reasmb: Tell me more about such feelings.
216 | reasmb: Do you often feel (2) ?
217 | reasmb: Do you enjoy feeling (2) ?
218 | reasmb: Of what does feeling (2) remind you ?
219 | decomp: * i * you *
220 | reasmb: Perhaps in your fantasies we (2) each other.
221 | reasmb: Do you wish to (2) me ?
222 | reasmb: You seem to need to (2) me.
223 | reasmb: Do you (2) anyone else ?
224 | decomp: *
225 | reasmb: You say (1) ?
226 | reasmb: Can you elaborate on that ?
227 | reasmb: Do you say (1) for some special reason ?
228 | reasmb: That's quite interesting.
229 | key: you
230 | decomp: * you remind me of *
231 | reasmb: goto alike
232 | decomp: * you are *
233 | reasmb: What makes you think I am (2) ?
234 | reasmb: Does it please you to believe I am (2) ?
235 | reasmb: Do you sometimes wish you were (2) ?
236 | reasmb: Perhaps you would like to be (2).
237 | decomp: * you* me *
238 | reasmb: Why do you think I (2) you ?
239 | reasmb: You like to think I (2) you -- don't you ?
240 | reasmb: What makes you think I (2) you ?
241 | reasmb: Really, I (2) you ?
242 | reasmb: Do you wish to believe I (2) you ?
243 | reasmb: Suppose I did (2) you -- what would that mean ?
244 | reasmb: Does someone else believe I (2) you ?
245 | decomp: * you *
246 | reasmb: We were discussing you -- not me.
247 | reasmb: Oh, I (2) ?
248 | reasmb: You're not really talking about me -- are you ?
249 | reasmb: What are your feelings now ?
250 | key: yes
251 | decomp: *
252 | reasmb: You seem to be quite positive.
253 | reasmb: You are sure.
254 | reasmb: I see.
255 | reasmb: I understand.
256 | key: no
257 | decomp: *
258 | reasmb: Are you saying no just to be negative?
259 | reasmb: You are being a bit negative.
260 | reasmb: Why not ?
261 | reasmb: Why 'no' ?
262 | key: my 2
263 | decomp: $ * my *
264 | reasmb: Lets discuss further why your (2).
265 | reasmb: Earlier you said your (2).
266 | reasmb: But your (2).
267 | reasmb: Does that have anything to do with the fact that your (2) ?
268 | decomp: * my* @family *
269 | reasmb: Tell me more about your family.
270 | reasmb: Who else in your family (4) ?
271 | reasmb: Your (3) ?
272 | reasmb: What else comes to mind when you think of your (3) ?
273 | decomp: * my *
274 | reasmb: Your (2) ?
275 | reasmb: Why do you say your (2) ?
276 | reasmb: Does that suggest anything else which belongs to you ?
277 | reasmb: Is it important that your (2) ?
278 | key: can
279 | decomp: * can you *
280 | reasmb: You believe I can (2) don't you ?
281 | reasmb: goto what
282 | reasmb: You want me to be able to (2).
283 | reasmb: Perhaps you would like to be able to (2) yourself.
284 | decomp: * can i *
285 | reasmb: Whether or not you can (2) depends on you more than me.
286 | reasmb: Do you want to be able to (2) ?
287 | reasmb: Perhaps you don't want to (2).
288 | reasmb: goto what
289 | key: what
290 | decomp: *
291 | reasmb: Why do you ask ?
292 | reasmb: Does that question interest you ?
293 | reasmb: What is it you really wanted to know ?
294 | reasmb: Are such questions much on your mind ?
295 | reasmb: What answer would please you most ?
296 | reasmb: What do you think ?
297 | reasmb: What comes to mind when you ask that ?
298 | reasmb: Have you asked such questions before ?
299 | reasmb: Have you asked anyone else ?
300 | key: because
301 | decomp: *
302 | reasmb: Is that the real reason ?
303 | reasmb: Don't any other reasons come to mind ?
304 | reasmb: Does that reason seem to explain anything else ?
305 | reasmb: What other reasons might there be ?
306 | key: why
307 | decomp: * why don't you *
308 | reasmb: Do you believe I don't (2) ?
309 | reasmb: Perhaps I will (2) in good time.
310 | reasmb: Should you (2) yourself ?
311 | reasmb: You want me to (2) ?
312 | reasmb: goto what
313 | decomp: * why can't i *
314 | reasmb: Do you think you should be able to (2) ?
315 | reasmb: Do you want to be able to (2) ?
316 | reasmb: Do you believe this will help you to (2) ?
317 | reasmb: Have you any idea why you can't (2) ?
318 | reasmb: goto what
319 | decomp: *
320 | reasmb: goto what
321 | key: everyone 2
322 | decomp: * @everyone *
323 | reasmb: Realy, (2) ?
324 | reasmb: Surely not (2).
325 | reasmb: Can you think of anyone in particular ?
326 | reasmb: Who, for example?
327 | reasmb: Are you thinking of a very special person ?
328 | reasmb: Who, may I ask ?
329 | reasmb: Someone special perhaps ?
330 | reasmb: You have a particular person in mind, don't you ?
331 | reasmb: Who do you think you're talking about ?
332 | key: everybody 2
333 | decomp: *
334 | reasmb: goto everyone
335 | key: nobody 2
336 | decomp: *
337 | reasmb: goto everyone
338 | key: noone 2
339 | decomp: *
340 | reasmb: goto everyone
341 | key: always 1
342 | decomp: *
343 | reasmb: Can you think of a specific example ?
344 | reasmb: When ?
345 | reasmb: What incident are you thinking of ?
346 | reasmb: Really, always ?
347 | key: alike 10
348 | decomp: *
349 | reasmb: In what way ?
350 | reasmb: What resemblence do you see ?
351 | reasmb: What does that similarity suggest to you ?
352 | reasmb: What other connections do you see ?
353 | reasmb: What do you suppose that resemblence means ?
354 | reasmb: What is the connection, do you suppose ?
355 | reasmb: Could here really be some connection ?
356 | reasmb: How ?
357 | key: like 10
358 | decomp: * @be *like *
359 | reasmb: goto alike
360 |
--------------------------------------------------------------------------------
/resources/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | ${ant.description}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | ${line}
81 | Building the Processing library ${project.name} ${library.version}
82 | ${line}
83 | src path ${project.src}
84 | bin path ${project.bin}
85 | classpath.local ${classpath.local.location}
86 | sketchbook ${sketchbook.location}
87 | java version ${java.target.version}
88 | ${line}
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 | ${exampleDir}
339 |
345 |
346 |
352 |
353 |
354 |
355 |
356 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 | ${line}
375 | Name ${project.name}
376 | Version ${library.prettyVersion} (${library.version})
377 | Compiled ${project.compile}
378 | Sketchbook ${sketchbook.location}
379 | ${line}
380 | done, finished.
381 | ${line}
382 |
383 |
384 |
385 |
386 |
387 |
--------------------------------------------------------------------------------