The goal is this: create a Guacuno-to-English dictionary that I can install on a Nook application or anything else I choose to publish my book to. I found https://github.com/freedict/fd-dictionaries/wiki/FreeDict-HOWTO the free dictionary website which seems to support this endeavor and I’m following their tutorial on how to write a FreeDict dictionary.
The first section refers to requirements.
Requirement 1. Licensing and copyrighting. This isn’t much of an issue for me. The language is book specific so I doubt it serves much purpose sitting in the FreeDict repository for GPL download. But if it does, I am all in.
Requirement 2. The FreeDict uses TEI XML markup. This is a requirement and a huge challenge if not an outright block. We shall see. Future posts are sure to come.
Requirement 3. The FreeDict requires Unicode, preferably with a UTF-8 character set.
The road to a dictionary has many forks. For the moment, I’m going to jump ahead to step 8, editing TEI XML at https://github.com/freedict/fd-dictionaries/wiki/FreeDict-HOWTO-%E2%80%93-Editing-TEI-XML.
Fork 1. If you are a VIM person, like me, the site recommends installing a vim plugin called tei-snippets.com. In order to install a snippet, they send you off to https://github.com/garbas/vim-snipmate. Shipmate is a GitHub site with software that enables language-specific editing. But before you install that, they send you off to Pathogen.
Fork 2. Pathogen is a VIM installation aid found at https://github.com/tpope/vim-pathogen that helps you “manage your ‘runtimepath’ with ease. In practical terms, pathogen.vim makes it super easy to install plugins and runtime files in their own private directories.” The directions there have you install pathogen.vim to ~/.vim/autoload/pathogen.vim. This worked for me:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Then you add “execute pathogen#infect()” to your vimrc. Since I didn’t have .vimrc in my home directory, the instructions suggest:
execute pathogen#infect() syntax on filetype plugin indent on
Once this is done, “any plugins you wish to install can be extracted to a subdirectory under ~/.vim/bundle, and they will be added to the ‘runtimepath’.
Merge back to 1. Now with pathogen installed, you can install all the plugins from the Snipmate project. All of this worked for me:
% cd ~/.vim/bundle % git clone https://github.com/tomtom/tlib_vim.git % git clone https://github.com/MarcWeber/vim-addon-mw-utils.git % git clone https://github.com/garbas/vim-snipmate.git # Optional: % git clone https://github.com/honza/vim-snippets.git
To prove that everything worked, I created a hello.cpp file, inserted the word “for” followed by a tab, and voila, I get:
The “tei-snippet” doesn’t exist in the Snipmate download, the next challenge for another day.