vlviewtext manual

What it is

vlviewtext is a simple web-based program to read texts and show the concordance of any word in the text that has been clicked. It is designed for readers who want to see how words are used in different contexts, researchers who are looking for a light on the ground tool, or language learners and teachers who want to study how words are used in a text.

How to use it

The starting point is a text file encoded in UTF-8, located on a user's device. This may be prepared on a text editor or a word processor, although in the latter case, it must be saved in .txt format. Other types of texts like html and pdf may be read in but will not give good results since they contain many extraneous codes. vlviewtext works happily with texts up to the size of a novel; larger files can take too long to process.

vlviewtext includes three views:

Initial page

The initial page looks like this:

vlviewtext initial page

To load a file, click on the Browse... button. This will open a dialogue on your device which you can use to select the text you wish to explore. Click on your device's dialogue to choose a text then click on the View button to load the file.

Files may also be downloaded from an online page, saved to the user's device, and then loaded into vlviewtext as explained above. As a convenience, the online vlviewtext page includes a Samples directory (at https://vincilingua.ca/Tools/Samples) which includes several text files that may be downloaded in this way, including proust.txt, a long novel in French taken from Project Gutenberg but with the header and footer removed, and, bees.txt, a short text in English about bumblebees taken from a the Canadian BroadCasting Corporation with html codes removed.

Text view

Once a textfile has been loaded, you will see a text view page that looks like this (based on proust.txt):

vlviewtext text view

The middle of the page contains the first 100 words of the text, with just above the beginning and ending word numbers of the block and the name of the textfile being shown. Below the text are four buttons: the Restart button returns to the main loading page to choose another text to work on, the Beginning button returns to the initial block from anywhere else, and the Back and Forward buttons move from block to block. When one of these buttons has been clicked, it will remain in focus so that multiple forwards or backwards may be obtained by means of a simple enter until a different button is clicked.

In the text view, clicking on any word in the block of text will open the concordance view (see below) and show the concordance for that word.

The Find pattern box and button at the top of the page will be discussed below.

Concordance view

Let's assume that the user has clicked on the word bonne in the text view. The resulting concordance page will look like this:

vlviewtext concordance view

Each occurrence of the keyword (here, bonne) will appear on a line with several words of context to the left and right and the position of the word in the text in the left hand column. Depending on the number of occurrences, the concordance may fill one or more screens. Initially, occurrences are sorted by their position in the text.

Just above the concordance, there are two sorting buttons:

The Find pattern box and button at the top of the screen will be discussed below.

Within a concordance, if a user clicks on one of the occurrences in red, they will be taken back to the text view with the occurrence clicked on centred and bolded in the middle of a block. So, if a user clicks on the occurrence at 40280, the resulting text view will look like this:

vlviewtext return to text view

Finding complex patterns

As noted above, both text and concordance views include a Find pattern box and button. This permits more complex searches. For example, when a word in the text has been clicked, the exactly corresponding string will be found in the concordance. So if the clicked word is Longtemps, including a comma, only items containing an initial capital letter and a trailing comma will be found. To provide finer control, the Find pattern feature allows the use of regular expressions. A full discussion of regular expressions is beyond the scope of this page, but the following examples will illustrate the essentials.

It is useful to play with these patterns to make them more familiar and to better understand the underlying structures within a concordance. As a short illustration, assume that a user has entered the search pattern ^avai[st]$ in either a concordance or text view of the proust.txt document. The result will look like this:

vlviewtext complex search view

Note that this is only a small section of the result, but it can been seen that it includes both avais and avait, but not, for example, avaient.

Saving text and concordances

Once a text page or a concordance has been created, it may be saved to the user's device by clicking on the browser's save button (typically control-s or Command s or a right mouse click). You will be prompted for the name and location on your device to save the file.

Basic architecture

vlviewtext follows the old Unix philosophy of doing one thing (and with luck doing it well). As a result, it has only a small number of basic features. It is written in pure JavaScript so users can see and, if they wish, modify the code. It uses no cookies.

Once downloaded, vlviewtext can be used offline, making it suitable for contexts where internet is not available. It is usable on most devices including desktops, tablets and phones, although concordances are harder to manipulate on phones. By doing most of the heavy lifting of analysis on arrays rather than DOM, it allows work on relatively large texts, up to about the size of a novel.

Sharing

Like all the software on the VinciLingua site, vlviewtext is freely available for personal use. Users should feel free to share the software but should not remove mention of the original author.

Users are encouraged to share stories of use, to signal any problems or to suggest any improvements by writing to info@vincilingua.ca. We are particularly interested in cases of use involving teaching and learning of underresourced languages. Note though that this is still a work in progress. Suggestions for improvement are welcome, but we cannot commit to making any requested changes.

Institutions that charge for teaching and learning who wish wish to incorporate vlviewtext in courses or teaching materials should contact info@vincilingua.ca to discuss terms of access.