Projects and Talks
First step is to install TEI DTD's which are required to validate the dictionary XML markup. In the how to's which I found in freedict website it was mentioned it may be there in Debian repostiory to check use the following command
sudo apt-cache search TEI
Even though command gave me big list of output I couldn't understand which package tools to install because there was no package which exactly had the TEI name in it. So to be more specific I tried sudo aptitude search TEI which didn't gave me any output indicating TEI specific package was not there in Ubuntu repository. So I went for manual download and install. Below are the steps which I followed to install DTD's on my machine
1. Download the tei0.3.1.zip which was mentioned in the How To's from this link (P.S you may have to scroll down a bit to find this package).
2. Next create a directory by name TEI in your home directory
mkdir ~/TEI
3. Copy the zip file to the TEI directory and unzip it. You can use following commands or you can do it from GUI
cp tei0.3.1.zip ~./TEI cd ~./TEI unzip tei0.3.1.zip
4. According to the How To's this zip file should have contained only DTD files but for my surprise I found a directory xml with 2 subdirectories tei and teip4. After a bit of searching i found the files mentioned in the directory teip4/schema/dtd/. For your references here is the list of file you will find in this directory
catalog.local teiclas2.ent teigen2.dtd teind2.ent teite2n.dtd catalog.tei teicore2.dtd teigis2.ent teinet2.dtd teiterm2.dtd catalog.xml teicorp2.dtd teihdr2.dtd teipl2.dtd teiterm2.ent dummy.dtd teidict2.dtd teikey2.ent teipros2.dtd teitran2.dtd index.html teidict2.ent teilink2.dtd teisgml.dec teitran2.ent index.xml teidram2.dtd teilink2.ent teishd2.dtd teitsd2.dtd tei2.dtd teidram2.ent teilite.dec teispok2.dtd teivers2.dtd teiana2.dtd teifig2.dtd teilitex.dec teispok2.ent teivers2.ent teiana2.ent teifig2.ent teilitex.dtd teistr2.dtd teiwsd2.dtd teiback2.dtd teifron2.dtd teilitex.ent teitc2.dtd teixlite.dec teicatalog.xml teifs2.dtd teimix2.dtd teitc2.ent xml.dcl teicert2.dtd teifsd2.dtd teind2.dtd teite2f.dtd iso*ent
I copied the file list from the Free Dict how to and modified the list to reflect what you will find in the dtd directory. As you can see the file names in red are extra (which was not there in original list) iso*ent represents set of new files whoose name starts with iso and have extension .ent. You have 9 files which matches this regexp ;).
5. Next step is to update the system catalog files to reflect the state of XML and SGML tree. The system catalog for SGML lies under /etc/sgml/ and for XML its under /etc/xml. For updating the SGML catalog I used the update-catalog command. For updating the XML catalog there is update-xmlcatalog command but I was unable to figure out how to use it so manually updated the XML catalog.
For updating the SGML catalog run following command
sudo update-catalog --add --super ~/TEI/xml/teip4/schema/dtd/catalog.local
One more thing in How To's it was mentioned catalog.tei should be used to update the catalog files. But there was no catalog.tei in the zip which I used but when I had a look at the content catalog.tei given in the How To's page and contents of catalog.local both were exactly similar except to new iso*ent files in catalog.local so I decided to use catalog.local instead. If you are so curious what this command does just open /etc/sgml/catalog file in a text editor you will see it added only one line at end of the file. After executing the command your catalog file content should be like this
-- ## ====================================================================== ## /etc/sgml/catalog : SGML Open Style super catalog ## ====================================================================== ## Please use update-catalog(8) to modify this file. ## ====================================================================== -- CATALOG /etc/sgml/xml-core.cat CATALOG /etc/sgml/sgml-data.cat CATALOG /etc/sgml/docbook-xml.cat CATALOG /etc/sgml/metacity-common.cat CATALOG /home/vasudev/TEI/xml/teip4/schema/dtd/catalog.local
P.S. Path may differ depending on your system configurations.
Now to update XML catalog file open /etc/xml/catalog in a text editor you have to be su for saving the file so use sudo with your text editor command
eg: sudo gedit /etc/xml/catalog
Add following line to end of the file before </catalog> tag
<delegatePublic publicIdStartString="-//TEI P4//DTD Main Document Type//EN" catalog="file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml"/> <delegateSystem systemIdStartString="http://www.tei-c.org/P4X/DTD/tei2.dtd" catalog="file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml" /> <delegateSystem systemIdStartString="http://www.tei-c.org/Guidelines/DTD/tei2.dtd" catalog="file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml" />
P.S: Change the path to catalog.xml file depending on your system.
Ok thats it folks you are all set to go ahead with construction of dictionary. In my next posts i'm going to write on different ways of writing dictionary different tags that are used with their meaning followed by how to convert your tei file to dict dictionary using dict tools. Have a nice day C'ya.
P.S: In the whole post I was mentioning this How To's ;)