I am trying to make a offline dictionary in java where you enter a word in a text field and the meaning of that word. Does anyone know of an API that can be used to make this dictionary? Any alternatives will also be appreciated.
A dictionary is nothing but a Map. It maps a keyword to a description (or a collection of descriptions).
Map<String, String> dictionary = TreeMap<String, String>();
dictionary.put("hello", "polite greeting");
System.out.println(dictionary.get("hello"));
A trivial starter is using a properties file and loading the data with/into a Properties instance.
File extract:
key=provides access to a value
value=maps to a key
hello=polite greeting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With