Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Java: create a dictionary/ vocab list

  1. Mar 10, 2012 #1
    Is there a way I can get the definitions from, say, dictionary.com?
    Does much method already exist or do I have to go about creating one? How would I get a specific something from a specific website?

    I prefer using java, but if there's another language that makes it easier, I also know C++ and VB.
     
  2. jcsd
  3. Mar 10, 2012 #2

    chiro

    User Avatar
    Science Advisor

    You are probably better off using a web-based scripting system to not only parse a web-page, but to also do the searching and web-page request if you need to.

    But in order to do this, you will need to first get the list of words you want to search for. For this you will need to download a standard text file or equivalent that contains just the terms and then use this in your script to search for the definition or if the website has a standard structure (like Wikipedia), you can just load the page directly and then parse the contents directly.

    After looking at dictionary.com, it does look like it has a standard address structure like Wikipedia in the form of http://www.dictionary.com/browse/word where word is the word you are looking for.

    If you wanted to do it in Java, you need the following routines:

    a) Make a connection to get the contents of a particular web-page
    b) Take the web-page and put it into some kind of structure like a graph or some more useful graph/other hybrid structure
    c) A way to search for the particular content you need
    d) A way to extract the structure you are searching for so that you can parse it easily and put it in another structure for your specific application.

    I haven't used Java in a very long time, but I imagine that routines should exist to do this kind of thing at least somewhere.
     
  4. Mar 12, 2012 #3
  5. Mar 12, 2012 #4

    harborsparrow

    User Avatar
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Java: create a dictionary/ vocab list
  1. Java linked list (Replies: 1)

Loading...