Re: Compare words (not Strings)

Discussion in 'Java' started by mromarkhan@rogers.com, Jun 21, 2004.

  1. Guest

    Peace be unto you.

    "word suggesting portion of a spell-checker"
    Working on your suggestion...


    A new column will store the hash of the string
    in the database (if Relational DB) .
    The program transforms the input into a hash value,
    and checks the result against the database for a match.

    Here is some sample code.

    import com.swabunga.spell.engine.*;
    public class HashR
    {
    public static void main(String [] s)
    {
    DoubleMeta dm = new DoubleMeta();
    String notMD5 = dm.transform("cinanmon");
    String notMD4 = dm.transform("cinnamon");
    String notMD3 = dm.transform("cinamon");
    System.out.println(notMD5); //SNNMN - return value
    System.out.println(notMD4); //SNMN - return value
    System.out.println(notMD3); //SNMN - return value
    }
    }

    Appendix:
    The Java Open Source Spell Checker
    jazzy - http://jazzy.sourceforge.net/
    jCVS A Java Based CVS Client
    http://www.trustice.com/java/jcvs/

    CVS Settings
    ------------
    PServer Checked
    Username:anonymous
    Password:
    CVS Module:jazzy
    CVS Server:cvs.sourceforge.net
    CVS Repository:/cvsroot/jazzy
    Checkout Directory:/jazzy

    All files are stored in C:\jazzy

    javac -classpath "C:\jazzy\jazzy\src;." HashR.java
    java -classpath "C:\jazzy\jazzy\src;." HashR
    --

    http://www.usc.edu/dept/MSA/quran/
    Windows Me - www.Microsoft.com
    scite - www.scintilla.org/SciTE.html - A free source code editor for Win32 and X
    google - www.google.ca - Search Engine
    Java
    www.sun.com java.sun.com
    , Jun 21, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Strøiman
    Replies:
    1
    Views:
    2,085
    Peter Strøiman
    Aug 23, 2005
  2. Richard Heathfield
    Replies:
    7
    Views:
    362
    Barry Schwarz
    Oct 5, 2003
  3. utab

    Words Words

    utab, Feb 16, 2006, in forum: C++
    Replies:
    6
    Views:
    420
    Daniel T.
    Feb 16, 2006
  4. BerlinBrown
    Replies:
    6
    Views:
    4,481
  5. Lasse Edsvik

    replace words with bold words

    Lasse Edsvik, Oct 5, 2003, in forum: ASP General
    Replies:
    9
    Views:
    236
Loading...

Share This Page