Text World

There are two kinds of text worlds, display world and reader world. These worlds can be used to model language, for example, to make networks that respond to sentences or that "talk". With text worlds, the way you set up couplings (see couplings) is especially important, so a review of that could help.

Reader World

These convert text to numbers and vectors of numbers. They can be used to model reading. The most common use would be to set up a reader world to produce inputs to a neural network.

The basic way reader worlds work is that you load some text of interest in to the main window (just copy and paste in).  Then, at each iteration of the workspace, the current token (either a word or a character) is highlighted, and is converted in to single number (scalar) or vector of numbers and sent to another component via couplings.

Parse Types, Preferences

This is set using the Word / Character radio button at the bottom of the main window (see figure below). 

Word-based: In this mode, the world advances through the text one word at a time, using a delimiter (defaulting to white space) that is set in the preference dialog.

Character-based: In this mode the world, advances through the text one character at a time.

Attribute Types, Vector Dictionary

Attribute types are set in the coupling manager. Reader world attributes are producers, since text is parsed and then used to produce numerical values.

Letter-based: These are scalar couplings where when a given letter is activated, a value of 1 is sent to the target consumer. The decimeter type should be set to character. For example in a network you could right click on a node, go to "receive scalar coupling from" and then in the context menu choose "ReaderWorld1" and then "a" to make that neuron respond to the letter a being parsed.

Token-vector: These are vectors couplings where when a given word or token is activated, the vector-dictionary is consulted, and a corresponding vector is sent to the target consumer (or a zero-vector if no match is found). The target will typically be a neuron group. The delimiter type should be set to word. The vector dictionary can be edited using the vector-dictionary editor, which stores a list of tokens and corresponding vectors, which can be of variable length.




Display World

These components convert numbers to text. The most common use of a display is to let a neural network produce "speech". Things could be set up so that when a given node is activated, the word "Cheese" is written to the display world window. 

The basic process of setting up a display world is first, setting up a dictionary (see below), and then coupling nodes in a neural network to the words in that dictionary, so that when those nodes are activated, the corresponding words are produced in the display world.

Dictionary

The dictionary is a simple list of words. Each entry in the dictionary is one word that can be written to the display world.

Edit / Display dictionary: To edit and display the current dictionary, press the grid-icon in the toolbar or select menu item Edit > Edit Dictionary. It is just a list of words. Rows can be added or deleted using straightforward commands. Dictionaries can also be loaded or saved to csv files, which are human-readable and easy to edit.

Extract-dictionary: Use this to select a text file, extract every word in it, and add it to the dictionary.  After extracting text, try displaying the dictionary to see what you got.

Attribute Types, Preferences

As with reader worlds, attribute types are set in the coupling manager. Display world attributes are consumers, since text is parsed and then used to produce numerical values. 

String-reader (disabled by default; enable it using the set attribute visibility command in the coupling manager ): This allows the component to directly receive text produced by a text based producer. It is not currently used much.

Word-reader: In this mode, each consumer is associated with a particular word, a particular entry in the dictionary. When the consumer consumes a numeric value, if that value is above a threshold, then the corresponding word is produced in the display world window. For example in a network you could right click on a node, go to "send scalar coupling to" and then in the context menu choose "DisplayWorld1" and then "cheese" to make activation of that neuron produce the word "cheese" in the display.

Display-Threshold: The numeric value that must be exceeded in order for a given word to be produced in the window. Used with word-reader attributes. By default it is set to .5.