Creating custom dictionaries

The data file and the index file used by the server are generated from base data in plain text or HTML format. These base data can be edited with a UTF-8 capable editor. After editing you need to generate the data and index file. The following example explains how you can create an Esperanto - Vietnamese dictionary. First, you need to extract the file WebDict1.zip to get the file vietdictXX.jar (XX is the version number)

Cach tao tu dien moi

Truoc het, ban can download WebDict1.zip va extract vietdictXX.jar (XX is the version number). Cac buoc tiep theo de tao tu dien nhu sau:
  1. Nhap du lieu cho tu dien bang text editor va chua du lieu vao 1 file mydict.txt, tot nhat duoi dang UTF-8. Moi entry co dang nhu sau:
    @headword
    * tu loai (noun, verb...)
    - dinh nghia 1
    = cau vi du cho dinh nghia 1 + nghia cua cau do
    - dinh nghia 2
    = cau vi du cho dinh nghia 2 + nghia cua cau do
    * tu loai
    - dinh nghia 3
    
  2. Tao text file mydict.cfg, trong file nay liet ke tat ca cac input files duoc dung, moi dong 1 file. Trong truong hop chi co 1 file du lieu thi danh sach nay chi co 1 dong voi noi dung: mydict.txt
  3. Chay lenh:
    java -cp vietdictXX.jar vietdict.tools.DBIndexGenerator
  4. Chuong trinh se hien len 1 cua so de chon lua danh sach cac nguon du lieu. Khi do:
  5. Bam Run se tao index file (mydict.index), data file (mydict.dict) va ini file (mydict.ini)
  6. Su dung TD moi bang lenh:
    java -Ddebug=true -DBUFFER=10 -Dhttp_port=8080 -cp vietdictXX.jar mydict.ini

    Ban se nhin thay thong bao: server started...
    Bay gio co the dung browser vao dia chi http://localhost:8080 de tra tu dien