PDA

View Full Version : پروپه برنامه نویسی تصحیح گر متن(spell checker)



vanguard11
دوشنبه 15 خرداد 1391, 14:46 عصر
با سلام خدمت همه دوستان .
راستش برای درس برنامه سازی پیشرفته به زبان جاوا باید یه پروژه بنویسم که کار تصحیح متن رو انجام بده.به دلیل اینکه تازه ترم دوم هستم زیاد به برنامه سازی پیشرفته آشنا نیستم و بد جوری گیر کردم! حالا خواستم ببینم از دوستان کسی می تونه کمکم کنه؟ خودم تو اینترنت یه برنامشو پیدا کردم ولی چیزی ازش حالیم نشد!!برنامرو این پایین میذارم:
public class SpellChecker { public static void main(String[] args) { SET<String> dictionary = new SET<String>(); // read in dictionary of words In dict = new In(args[0]); while (!dict.isEmpty()) { String word = dict.readString(); dictionary.add(word); } System.out.println("Done reading dictionary"); // read strings from standard input and print out if not in dictionary System.out.println("Enter words, and I'll print out the misspelled ones"); while (!StdIn.isEmpty()) { String word = StdIn.readString(); if (!dictionary.contains(word)) System.out.println(word); } } }حالا اگه شما لطف کنین بگین این برنامه چطور نوشته شده ممنون میشم!

omidbizdotcom
دوشنبه 15 خرداد 1391, 15:00 عصر
http://blog.omidbiz.com/omidplanet/entry/jortho_a_java_spell_checking

vanguard11
دوشنبه 15 خرداد 1391, 15:17 عصر
دوست عزیز ممنونم از راهنماییتون ولی این برنامه خیلی سنگینه!! استادم فورا می فهمه که خودم ننوشتمش!!