Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: hmm.. question

  1. #1
    Senior Member boolean's Avatar
    Join Date
    Jun 2003
    Posts
    161
    Member #
    1615
    Hey,
    I'm trying to write a program that reads off of a txt file.
    The text file is just a list of words. I want the program to put the definitions in another file.
    I could do this in c++, but I need a premade program that i can input a word and it returns the defintion.
    Like, the msdos command i would use would be filename.exe theWord

    And then it prints out the definition on screen, which i can store in a file.
    But, I have been unable to find a program like that.
    If anyone knows of one, please tell me!

    Also,
    I know its possible to do the same thing in php. I know quite a bit in php, but the only thing I dont know is how to store what i site returns.

    Like, lets say i tell it to go to http://www.m-w.com/cgi-bin/dictionar...ary&va=TheWord

    How can I harness whatever the definiton is?
    I could do it if I knew how I could retrieve the source code of a site...., and i just tell it to search for whatever is after the header part and store that... but i dono

    any ideas, suggestions, etc would help!
    thx

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    umm.... where would it get the definitions from, if the text file only has the words?

  4. #3
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    I think he's talking about a spidering engine.. something that he would type a word in on his site, then it would search mw for the word, rip the html and give him the definition.

    Personally it sounds like stealing someone else's work, but I dont' know it's full uses yet. Also, I don't know how to make a spidering engine
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  5. #4
    Senior Member boolean's Avatar
    Join Date
    Jun 2003
    Posts
    161
    Member #
    1615
    Seems that you have misinterpreted what i'm saying.
    No way am i stealing someone elses work.
    M-W provides free definitions for words on their site.

    I got accepted into this scholars program, and we have to define like 50 words a day. Instead of having to put each word into m-w and copy and paste defnitions, I wanted to make a script that will do it for me, to where all I have to do is put all the words into one text file.

    All the script will do is add the word to the query, and then print the results. But what the problem I'm having is harvesting the section I need and getting rid of the html.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:28 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com