963 - Spelling Corrector

All about problems in Volume IX. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

963 - Spelling Corrector

Postby ImLazy » Sun Jan 20, 2008 11:23 am

Who can give some hints about the algorithm?
I stay home. Don't call me out.
User avatar
ImLazy
Experienced poster
 
Posts: 215
Joined: Sat Jul 10, 2004 4:31 pm
Location: Shanghai, China

Postby Jan » Sun Jan 20, 2008 9:00 pm

You can apply dp. To be more specific you can use LCS (with minor changes).
But I still dont know whether the judge data is present or not (for this problem).
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Postby andmej » Mon Jan 21, 2008 3:51 am

Excuse me for the newbiesness, I know DP means Dynamic programming, but what is LCS? :oops:
I'm I sorry if it this a stupid question, I just want to learn.
Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.

Are you dreaming right now?
http://www.dreamviews.com
User avatar
andmej
Experienced poster
 
Posts: 158
Joined: Sun Feb 04, 2007 7:45 pm
Location: Medellin, Colombia

Postby ImLazy » Mon Jan 21, 2008 10:02 am

andmej wrote:what is LCS? :oops:

Longest Common Substring (or Subsequence).
Last edited by ImLazy on Tue Jan 22, 2008 5:27 pm, edited 1 time in total.
I stay home. Don't call me out.
User avatar
ImLazy
Experienced poster
 
Posts: 215
Joined: Sat Jul 10, 2004 4:31 pm
Location: Shanghai, China

Postby ImLazy » Mon Jan 21, 2008 10:09 am

Jan wrote:You can apply dp. To be more specific you can use LCS (with minor changes).

You mean, for each given word, calculate its penalty with each word in the dictionary?
I stay home. Don't call me out.
User avatar
ImLazy
Experienced poster
 
Posts: 215
Joined: Sat Jul 10, 2004 4:31 pm
Location: Shanghai, China

Postby Jan » Mon Jan 21, 2008 7:15 pm

ImLazy wrote:You mean, for each given word, calculate its penalty with each word in the dictionary?

Yes.
Jan
Guru
 
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh

Postby ImLazy » Tue Jan 22, 2008 5:26 pm

Jan wrote:But I still don't know whether the judge data is present or not (for this problem).

It seems like you said. I kept getting Runtime Error. But when I submitted a code with only an empty main function, it was Accepted. There is quite something wrong with the test data of this problem.
I stay home. Don't call me out.
User avatar
ImLazy
Experienced poster
 
Posts: 215
Joined: Sat Jul 10, 2004 4:31 pm
Location: Shanghai, China

Postby mpi » Wed Jan 30, 2008 4:01 pm

What a pity! This seemed a very interesting problem. I've been waiting long for a spelling correction problem in order to apply the Levenshtein Distance algorithm efficiently, but in this one anyone can get AC with an empty main function :(
mpi
New poster
 
Posts: 46
Joined: Fri Nov 03, 2006 7:53 pm
Location: Madrid


Return to Volume IX

Who is online

Users browsing this forum: No registered users and 0 guests