Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Compare words (not Strings)

Reply
Thread Tools

Re: Compare words (not Strings)

 
 
mromarkhan@rogers.com
Guest
Posts: n/a
 
      06-21-2004

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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Words and non-words, according to Microsoft et al Steve B NZ Computing 11 03-21-2008 11:52 PM
Replace stop words (remove words from a string) BerlinBrown Python 6 01-17-2008 02:37 PM
Words Words utab C++ 6 02-16-2006 07:00 PM
Non-noise words are incorrectly recognised as noise words. Peter Strĝiman ASP .Net 1 08-23-2005 01:26 PM
Re: A little bit of help regarding my linked list program required. - "words.c" - "words.c" Richard Heathfield C Programming 7 10-05-2003 02:38 PM



Advertisments