Java: create a dictionary/ vocab list

  • Context: Java 
  • Thread starter Thread starter LindaS
  • Start date Start date
  • Tags Tags
    Java List
Click For Summary

Discussion Overview

The discussion revolves around methods for creating a dictionary or vocabulary list using programming languages, particularly Java. Participants explore how to retrieve definitions from online sources like dictionary.com and discuss various approaches to parsing web content.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about existing methods to obtain definitions from dictionary.com and whether they need to create their own solution.
  • Another participant suggests using a web-based scripting system to parse web pages and perform searches, emphasizing the need for a list of words to search for.
  • A suggestion is made to utilize the standard URL structure of dictionary.com for retrieving definitions.
  • Participants discuss the necessary routines for Java, including making connections to web pages, structuring the content, and extracting specific information.
  • One participant shares a link to a piece of code that retrieves word definitions from an online dictionary.
  • Another participant mentions the possibility of using a SOAP-based web service for dictionary definitions, indicating that it could be implemented in Java or C#.

Areas of Agreement / Disagreement

Participants express various approaches and tools for retrieving definitions, but no consensus is reached on the best method or the effectiveness of the suggested solutions.

Contextual Notes

Participants note the need for a structured approach to parsing web content and the potential limitations of using different programming languages or services.

Who May Find This Useful

Individuals interested in programming, web scraping, or developing applications that require dictionary functionalities may find this discussion relevant.

LindaS
Messages
3
Reaction score
0
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.
 
Technology news on Phys.org
LindaS said:
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.

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.
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
86
Views
3K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
21
Views
13K
  • · Replies 6 ·
Replies
6
Views
2K