NIALL...The Non-Intelligent AMOS Language Learner EXTRA ON THIS DISK Many people, who do not own AMOS, have written asking if it is possible to change the maximum number of words and the size of the text buffer from within Niall so that they can make full use of their 1Meg machines. While it is possible to change the Max number of words without hassle, the text buffer instruction HAS to be the first line in an AMOS program and so cannot be set from within the same program. To get around this I have written a routine which loads in the Niall2 binary file, allows you to change the values by altering the raw source code, and then saves the updated Niall2 to disk. The program then runs Niall2 for you. If you just press return when you are asked for MNW or Buffer size, the old values will be assumed. This program is called "Defaults" and can be run by pressing F2 on the Menu screen (NOTE: Defaults is an AMOS program and is Locked so you can't see how I've done it unless you have written an Unlock routine. I have written an Unlock routine..has anyone else?) Niall2 now runs under RAMOS1.23 which has the sequential file bug fixed so the new loading format which took a long time to code was not necessary (typical!). Still that's life. Now for the standard instructions............. I have sectioned the instructions into three parts so you can skip the bits which do not interest you. The sections are: 1....What NIALL does. 2....How to Use NIALL. 3....Credits. VERY IMPORTANT...Read this now! Niall was written on an expanded A500. Because of this the program contains Hi-Res graphics screens in 4 colours and up to a 3000 word vocabulary with a 140K buffer. Not surprisingly this did not work on unexpanded A500's. Instead of removing all of the above I left them alone and wrote in clauses which makes the unexpanded A500 version look a lot less impressive. It is, however, still the same program with the same vocabulary size and string buffer. However on an unexpanded machine the Hi-Res screens in 4 colours become Lo-Res screens in 2 colours. ALSO: In order to keep the buffer size and vocab size the same, users with Unexpanded A500's have to TURN OFF ALL EXTERNAL DRIVES or the program will crash! Updated functions of NIALL v2.1 1.......AMOS has a sequential file bug which means that Niall 1 failed to load dictionaries after roughly 600 words had been typed in. This bug is now fixed and a new loading format has been set up which makes dictionary loading approx. 5 times faster. 2.......Niall 2 will still load the old Niall dictionaries and will convert them on saving to the new format to make their loading faster. 3.......By optimizing the code the text buffer has grown by 20k so there is more room for larger conversations. 4.......On line help is now available at all times with the *HELP instruction and will work on unexpanded machines also. 5.......4 new commands and all other commands updated 6.......Dictionaries saved under a different max number of words can ne loaded without errors and will be converted for use. 7.......Niall no longer accepts rogue blank words so sentences are a little more coherent. One further note to users with expanded A500's or A2000's. If you have the AMOS package you can load the program and change the buffer size and vocab size if you feel the values I have set are too restricting. Buffer size can be set by altering the first line:  Set Buffer 140 (Reserve 140K) to any size memory allows. Vocab size can be set by altering the second line: MNW=3000  (Set MNW to the max number of words you wish.) WHAT NIALL DOES Niall attempts to learn English, or whatever language you care to teach it, by breaking down the sentences you type in, remembering words, connections between words, the number of times a particular connection has occurred, and start/end sentence markers. The best was to explain is by example. Suppose the first sentence you typed was: The large green tree was next to the old red shed Niall would split the sentence into separate words and store any new words it found (Niall's vocabulary is initially blank!). It would then store the following information: 1.....The word THE can begin a sentence. 2.....The word LARGE can follow the word THE. 3.....The word GREEN can follow the word LARGE...etc 4.....The word SHED can end a sentence. Therefore after analysing this sentence, NIALL has learnt 10 new words and knows that the word THE can not only start a sentence by also join onto both LARGE and OLD. This can be expressed as follows: /----------<---------------<----------------<----------\ (Start)\-THE --- LARGE -- GREEN -- TREE -- WAS -- NEXT -- TO -/ \ --- OLD --- RED --- SHED (End) Niall then replies to your sentence by picking a random word which can begin the sentence, followed by one of the words which can join onto it selected at random, then one which can join onto it, and so on until the end of sentence marker is reached. Therefore, NIALL may reply to your first sentence like so: The old red shed. The more sentences you type in the more words Niall will learn, the more connections it will make and the more original the replies will seem. Replies must be taken with a pinch of salt since the grammar will be anything but perfect. A semi intelligent version which attempts to learn grammar too, may appear at a later date. Niall also remember the number of times a particular connection is made in order to weight the replies and make them sound more realistic. For example, if the second sentence you type is: The old garden gate was blue Niall now knows that the word THE joins onto the word OLD more often than it joins to LARGE. The table above now looks like this: /----------<---------------<----------------<----------\ (Start)\-THE --- LARGE -- GREEN -- TREE -- WAS -- NEXT -- TO -/ \\ / \ === OLD - RED - SHED (End)/ -BLUE(End) \   /   - GARDEN - GATE/ Niall could now reply: The old garden gate was next to the old red shed. The sentences can begin to get original. Well that's basically it for how it works. If you have any questions contact me by writing to the address at the end of this text. HOW TO USE NIALL This is simplicity itself. You are given the prompt USER: Here you can type up to 255 words in any number of sentences, each sentence must be separated from the next by a full stop. It is not necessary to finish your sentence with a full stop if you only type one sentence. Each sentence of your input will be dealt with one after the other. It is perfectly legal to type: The cat sat on the mat. The cat was called George. IMPORTANT: Do NOT put COMMAS in your sentence because they are treated just like full stops. Niall will then reply and you can enter another sentence. If you just press return without entering anything, Niall will say something else. If you just press return when Niall has no vocabulary, the message "I cannot speak yet!" will be displayed. At the USER: prompt you can also enter one of the command words. All command words are prefixed by a "*". Notes that on NIALL version 1 the commands were prefixed by a "#" but this character is not available on all international keyboards so it was changed on request. The command words perform the following functions: *LIST - This will list the current dictionary from word number to word number . This extra function makes the list command more flexible. Both parameters are optional so all of the below are valid: *LIST ;Lists dictionary from the first to the last word. *LIST 10-100 ;Lists words 10 through to 100. *LIST 10 ;Lists from word 10 to the end of the dictionary. *LIST -100 ;Lists from the first word to word number 100. *LLIST - Outputs the same list to the printer. MAKE SURE THAT YOU HAVE THE BOOT DISC IN THE DRIVE because printer drivers need to be accessed and if a requester appears you will find it hard to close because the mouse pointer is shut down. *LPRINT Toggles continuous output of the sentences you type and Niall's replies to a printer. Again make sure the boot disk is in the drive. *CORRECT If you spell a word incorrectly and have already pressed return you can correct by using this command. You will be asked to enter the incorrect spelling and the new word which replaces it. *CORRECT now removes any duplicate words formed because of the correction eg. if you type "teh" instead of "the" and then correct it it will convert all links to the word "teh" into links to "the" and add any new links from to the connection string of "the". *SPEAK ,,, *SPEAK alone will toggle the speech on or off. *SPEAK followed by the above variables alter the sound of the voice but will not toggle it on and off. All of the variables are optional but if you want to just alter one of the effects you must put the commas in. :Changes the voice type. 0=Male, 1=Female :Adds the interflection. 0=Robot, 1=Interflection :Alters the voice pitch. Ranges from 65-320 :Alters the word rate. Ranges from 40 to 400 All of the below examples are valid *SPEAK :Toggles speech on/off. *SPEAK 0,1,150,100 :Sets a male, interflected, medium pitch and speed. *SPEAK ,,,150 :Sets the rate to 150. *SPEAK 1,,200, :Female high voice. *FRESH This will wipe the current vocabulary. You will be given the "Are you sure?" option before the vocabulary is cleared. *SAVE Saves the current vocab list to disk under any name. A file requester will appear. All files are saved under .NIALL. If you omit the .NIALL, the program will add it for you. All dictionaries are saved under Niall 2 format and information about the disk and the file are provided. *LOAD Loads a previously saved vocab list. The file requester can be used to select the file. An example file is provided on the disk and is called EXAMPLE.NIALL. Information about the file is given and a loading countdown is displayed. Niall 2 can still load Niall 1 dictionaries BUT Niall 1 will crash if you attempt to load a Niall 2 dictionary into it! *DELETE Allows deletion of unwanted words from the dictionary. It also removes any links to that word from elsewhere in the dictionary, but you are advised to use this function sparingly because it may lead to badly formed sentences. *STORE Based on an idea from Ragnar Fyri. This will toggle direct saving of the conversation to a ram: under a filename of your choice. This enables you to load the resultant file into a word-processor and to print out the parts you want. You MUST CLOSE THE FILE BEFORE YOU EXIT...Using *QUIT will do this for you and enable you to copy the ram files to disk *KILL Will allow you to delete any disk or closed ram: files that you do not want anymore. *HELP Will display a quick reminder of these instructions *QUIT The nice way to exit. You will be given the "Are you sure?" option. It will also close any ram: files you have open and will allow you to copy them to disk so that you can load them into a word processor or text editor. Note CTRL-C will also work but exit by this method is immediate. That's it. Have fun, and remember that the more rubbish you type in, the more you'll get back CREDITS All program code and graphics by Matthew Peck in 1991. Program written using AMOS 1.2, and run using RAMOS 1.2. Other credits to: Chris Palmer.......For finding the loading bug in Niall 2.0 Ragnar Fyri........For his help and suggestions concerning extra functions in Niall2 Rob Elsas..........For ideas concerning dictionary standardisation. Tom Kennedy........For finding the nasty bugs for me. Patrick Fox........Who helped playtest this, and whose major contribution was helping iron out the bugs, as well as teaching Niall to swear. Adam Wright........For not stealing the idea and writing his own version, which he very nearly did, and for playtesting. Kevin Tye..........For being a good demo contact and nice guy. Gary Keogh.........For being a most encouraging and good fun sort of room mate at college. Francois Lionet....For taking the effort to code AMOS and not do a direct STOS conversion. Sarah Gould........For being a wonderful, warm and caring girlfriend whenever I need her. If you have any problems, suggestions, ideas, updates, extra functions, marvellous dictionaries, complaints, the odd red Ferrari Testarossa you don't want, or 5 million pounds to give away, then contact me (Mat Peck) at: 23 WELBECK AVENUE, BEDGROVE, AYLESBURY, BUCKS, ENGLAND, HP21 9BH. PLEASE SEND AN SAE WITH ALL CORRESPONDENCE....Thanks AMOS and RAMOS (c) 1990 Mandarin/Jawx NIALL is (c) Matthew Peck 1990,91