Adding Source Texts to Gnoetry
Want to add your favorite book or custom selection of texts to Gnoetry? Adding new source texts into Gnoetry is a simple process. If you are working between operating systems, though, the steps below can help you to avoid any problems.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1. Acquire or create a plain text file of your source. Make sure the file is saved as plain text (.txt) , preferably in UTF-8 or Western (US/ASCII) encoding. In Ubuntu, it is best to create this file using the Text Editor program; in Windows, use the Notepad program. These programs will not add any metadata to the text files.
TIP: As a failsafe, make sure any file you create can open with the Text Editor program in Ubuntu, remove any gobbledygook metadata that you find from the top of the file, and save it as plain text.
2. At the top of your source file, you must append this header at the top:
Title: Moby Dick
Author: Herman Melville
Replace the title and author in the example above with your text’s, and make sure there are no spaces between the four lines.
3. Save the text file (again, as a plain text file) in the texts-txt folder in your gnoetry directory.
4. In the Terminal, go to gnoetry/tools and run the tokenize-all.py script. You may do this as often as you like. It simply adds new or modified text files in the texts-txt file to gnoetry’s database of sources.
% cd gnoetry/tools
Don’t worry about the “dropped sentences” that the script reports. These are often parts of the text file such as ordered lists (2.) that end in periods but contain no sentences or words. It usually reports a “loss” of about 5-10% of the “words” in the file.
5. That should do it. Get back to gnoetry/interface and run the gnoetry script as usually. Your new texts should show up on the list.
% cd ../interface (.. sends you up one directory)