Contact

August 28th, 2010 Leave a comment Go to comments

Name (required)

Email Id (required)

Website URL

Subject

Message

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • IndianPad
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • RSS
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Reddit
  • Add to favorites
  • PDF
  • Twitter
  1. lavanya
    October 14th, 2009 at 18:19 | #1

    i have no idea about wordnet. plz help me how to connect to rita wordnet. plz and also some sample code
    to retrieve from wordnet using standford or jwi or jwnl or rtita wordnet.

    // PURPOSE: ALGORITHM FOR CLASSIFICATION OF WORDS USING JAVA
    // AND WORDNET

    // I/P: TEXT FILE CONSISTING OF NON REDUNDANT WORDS

    // O/P: FILE CONSISTING OF CLASSIFIED WORDS ACCORDING TO THEIR POS

    //Initialize RitaWordNet object
    RitaWordnet wordnet = new RitaWordNet (null)

    //read or open the file
    If (! file) then
    Throw an exception indicating an error has occurred and exit
    Else
    Open a file in read mode

    Declare a buffer to read the file and do further operations

    BEGIN

    //Initialize flags F1, F2, F3, F4 to zero
    F1<-0, F2<-0, F3<-0, F4 noun
    v –> verb
    a –> adjective
    r –> adverb */

    Set the flags according to the contents of string i.e.
    Obtain the length of the string

    for i<- 0 to (length-1)

    // assign all flags to 0 ie F1<-0, F2<-0, F3<-0, F4<-0

    If pos[i]=’a’ then
    F1<-1

    if pos[i]=’n’ then
    F2<-1

    if pos[i]=’r’ then
    F3<-1

    If pos[i]=’v’ then
    F4<-1

    END FOR

    IF F1 = 1 AND F2 = 1 AND F3 = AND F4 = 1 then
    WRITE the word onto column1 ANRV

    Else

    IF F1 = 1 AND F2 = 1 AND F3 = 1 then
    WRITE the word onto column2 ANR

    Else

    IF F1 = 1 AND F2 = 1 AND F4 = 1 then
    WRITE the word onto column3 ANV
    Else

    IF F1 = 1 AND F3 = 1 AND F4 = 1 then
    WRITE the word onto column4 ARV

    Else

    IF F2 = 1 AND F3 = 1 AND F4 = 1 then
    WRITE the word onto column5 NRV

    Else

    IF F1 = 1 AND F2 = 1 then
    WRITE the word onto column6 AN

    Else

    IF F1 = 1 AND F3 = 1 then
    WRITE the word onto column7 AR

    Else

    IF F1 = 1 AND F4 = 1 then
    WRITE the word onto column8 AV

    Else

    IF F2 = 1 AND F3 = 1 then
    WRITE the word onto column9 NR

    Else

    IF F2 = 1 AND F4 = 1 then
    WRITE the word onto column10 NV

    Else

    IF F3 = 1 AND F4 = 1 then
    WRITE the word onto column11 ANV

    Else

    IF F1 = 1 then
    WRITE the word onto column12 A

    Else

    IF F2 = 1 then
    WRITE the word onto column13 N

    Else

    IF F3 = 1 then
    WRITE the word onto column 14 R

    Else

    IF F4 = 1 then
    WRITE the word onto column15 V

    Else

    WRITE the word onto column16 OTHERS

    END

    /* This can also implemented using methods like isnoun(), isadverb(), isverb() & isadjective(). These methods return Boolean values.
    Take each word from the file and then using these methods set the flag values. Depending on the flag values right onto the respective file */

    Display the contents of each file

    • October 15th, 2009 at 09:09 | #2

      Hi Lavanya,
      I also have not tried using wordnet using Java. But will surely post the solution if i am able to use it smoothly.

  2. Imran
    July 28th, 2010 at 23:06 | #3

    Hi, Hitesh,
    Can you please tell me how to acces excel sheet with java.

  3. Imran
    August 2nd, 2010 at 00:09 | #5

    Hi Hitesh,
    Thanks for your article but where can i find jxl package.Is it an inbuild package in java????

  1. No trackbacks yet.