Wednesday, October 26, 2016

823 Java 8 Class for adding, modifying, deleting, searching records in multiple dictionary txt files

As part of myself being bitten by the Java 8 bug, now, I am providing to my Readers, a Java Class, useful for accessing, and amending .txt files. This is not a traditional text editor. The ydictiedit.class (Java 8) being provided by me, is mainly intended to amend the words in dictionaries created as '.txt' files. This ydictiedit class works with a model of add / delete / search / get / net / prev buttons, which we normally find in case of database files such as mysql, sqlite, postgresql, old model flat files like dbase, msaccess etc. etc. Most of the traditional database models involve use of 'sql' commands, 'sql' queries and 'sql' reports. For additional security they may even require userids, passwords, servers etc. etc.

Question: We could have used 'xml' dictionary files, and xml parsers?

Ans: Use of 'xml' files need schema, which itself is somewhat complex. Opening an xml data file, becomes difficult, even if there is 'slightest' error in the tags. Besides, xml files tend to be heavy in memory size. Very often, they require use of special 'xml' editors for adding records and validation.

Taking all these things into consideration, I have chosen the 'txt' files for storing data of words.

Question: We could have used csv (comma separated values) files?

Ans: Use of 'comma separated value' csv files is also cumbersome for ordinary persons. The benefit using text files is, users can always open the txt files in traditional text editors such as notepad, MSword, gedit, geany etc., and add/modify/delete words there direct.

Question: Java 8 is also complex. We could have used 'php'?

One php script I have already given in our previous blog posts. I have also given one Medical Dictionary Sample Text with Java 8.

The main advantage of the new ybdictiedit.class being given by me with two dictionary text files (1. simple dictionary 2. Sample Medical Dictionary (already given in the previous post now given here also), is: User will have a greater choice. If he has ten dictionaries in the folder say compu.txt, physic.txt, chemistry.txt, anatomy.txt, pharmacology.txt etc. etc., he can chose any of the text files for adding, deleting, modifying, browsing, records. Besides, Java classes work in almost all OSes i.e. Windows, Linux, Mac. Hence, we get the benefit of platform independence.

Traditional text editors are like 'eating bread' as whole lumps, instead of slicing them. ybdictiedit class cuts them into loaves / slives, using a delimiter '^`'. For this reason only, it has been suggested that while adding records we have to start every word with "^`".

HERE IS A SCREENSHOT OF HOW THE YBDICTIEDIT CLASS LOOKS when it is invoked from Commandline (Dos prompt)


LINK for downloading the ydictiedit class

Click to go to This zip file has been uploaded by me to, and stored with my free web host, There are no advertisements.

When the download window appears, select 'save' instead of 'open'. After saving the file to a folder of your choice, say 'Desktop', you can unzip it with any unzip facility. Then you will get a folder with name 'ysimpldicti'. This folder contains 1. ydictiedit java 8 class, and its associate sub classes. 2. 2 dictionary text files: 1. simpldicti.txt 2.ybmedicdicti.txt. 3. A screenshot jpg. 4. Readme file. This contains suggestions on how to use. No need of installation. 5. Java 8 also, there is no need to install. 'java8' folder can be stored on a USB pendrive, and can be accessed from command line /dos prompt using path/java ydictiedit command.

This piece of software is being provided for FREE DOWNLOAD only for EDUCATIONAL AND RESEARCH PURPOSES. Kindly do not put to any commercial purposes.

For other instructions pl. see readme file there.

To continue. सशेष. ఇంకా ఉంది.

1 comment:

  1. DreamHost is one of the best hosting company with plans for all of your hosting needs.


ఘోరమైన విమర్శలకు కూడ స్వాగతం, జవాబులు ఇవ్వబడతాయి. Harsh Criticism is also welcome.