Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6038967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:17:56+00:00 2026-05-23T06:17:56+00:00

I’m installing WordNet in MySQL from http://www.semantilog.org/wn2sql.html I’d like to display the data in

  • 0

I’m installing WordNet in MySQL from http://www.semantilog.org/wn2sql.html

I’d like to display the data in the same way as Princeton’s webpage: http://wordnetweb.princeton.edu/perl/webwn?s=car

How would I query the database to do that? I’m using PHP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:17:57+00:00Added an answer on May 23, 2026 at 6:17 am

    From what I gather from the documentation on the website, it seems you need to query three tables.

    First you query the word table in order to get it’s wordno, a unique number each word has. It would look something like this.

    //assuming you've connected to your MySQL db
    $word=$_GET['s']; //This variable stores the value given through url
    if (ctype_alpha($word)){ // If it's alphabetical
      $word_clean=mysql_real_escape_string($word); //Sanitize it for MySQL
    }else{
      //Not a valid word, error handle
      exit();
    }
    $query='SELECT wordno FROM word WHERE lemma=`$word_clean` LIMIT 1';
    $result=mysql_query($query);
    

    Next, we need to query the sense table in order to get the synsetno, which’ll output the different senses of the word. Ex: can (noun) and can (verb), each have a unique number which is the synsetno

    The MySQL query will be something along the lines of:

    $query='SELECT synsetno FROM sense WHERE wordno=`$wordno`';
    

    For each result you get from that query, you’ll have to query the synset table to get the definition of each sense. Can (noun) and can (verb) have different definitions. The query for each synsetno.

    $query='SELECT definition FROM synset WHERE synsetno=`$synset`';
    

    And presto! You have yourself a pretty cool dictionary. It is a pain on the CPU, however, to have to query three tables, each with a ton of records.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have some data like this: 1 2 3 4 5 9 2 6
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.