Index: app/src/kor/cmdline_cor.ggo
===================================================================
--- app/src/kor/cmdline_cor.ggo	(revision ac7d97018efb6419eb3d840b7767294d8be71ed8)
+++ app/src/kor/cmdline_cor.ggo	(revision b3179eb76e65f846cde4eec832f307990dacf31c)
@@ -4,7 +4,10 @@
 option "dictionary-home"	-	"Dictionary home dir." string typestr="FILENAME" no hidden
 option "dictionary"		d	"Dictionary" string typestr="FILENAME" default="cor.bin" no
-option "distance"		n	"Maximal edit distance." int default="1" no
+option "distance"		D	"Maximal edit distance." int default="1" no
 option "replace"		r	"Replace original form with corrected form, place original form in the cor field. This option has no effect in single mode" flag off
 #option "single"			-	"Place all alternatives in the same line" flag off
 option "weights"		w	"File with translation rules." string typestr="FILENAME" default="weight.cor" no
 option "threshold"		t	"Edit distance threshold" float default="1" no
+option "show-scores"		-	"Show scores" flag off
+option	"count"			n	"Print only count best results" int no
+
Index: app/src/kor/common_cor.cc
===================================================================
--- app/src/kor/common_cor.cc	(revision ac7d97018efb6419eb3d840b7767294d8be71ed8)
+++ app/src/kor/common_cor.cc	(revision b3179eb76e65f846cde4eec832f307990dacf31c)
@@ -8,4 +8,6 @@
 char file_weights[MAX_PATH_LENGTH];
 float threshold;
+bool show_scores = false;
+int result_count;
 
 void process_cor_options(gengetopt_args_info* args)
@@ -25,3 +27,12 @@
   
   threshold = args->threshold_arg;
+
+  show_scores = args->show_scores_flag;
+
+  if(args->count_given) {
+    result_count = args->count_arg;
+  }
+  else {
+    result_count = 0;
+  }
 }
Index: app/src/kor/common_cor.h
===================================================================
--- app/src/kor/common_cor.h	(revision ac7d97018efb6419eb3d840b7767294d8be71ed8)
+++ app/src/kor/common_cor.h	(revision b3179eb76e65f846cde4eec832f307990dacf31c)
@@ -22,4 +22,6 @@
 extern char file_weights[];
 extern float threshold;
+extern bool show_scores;
+extern int result_count;
 
 #endif
Index: app/src/kor/main.cc
===================================================================
--- app/src/kor/main.cc	(revision ac7d97018efb6419eb3d840b7767294d8be71ed8)
+++ app/src/kor/main.cc	(revision b3179eb76e65f846cde4eec832f307990dacf31c)
@@ -77,4 +77,12 @@
 	      	      tab.sort();
 
+		int max_cnt = 0;
+		if(result_count < 1) {
+			max_cnt = tab.count();
+		}
+		else {
+			max_cnt = (tab.count() < result_count) ? tab.count() : result_count;
+		}
+		
 	      if(args.replace_flag)
 		{
@@ -98,9 +106,12 @@
 		    {
 		      char* p=corfield;
-		      for(int i=tab.count()-1; i >= 0; --i)
+		      for(int i=tab.count()-1; i >= tab.count()-max_cnt; --i)
 			{
 			  if(tab[i].w_suf() > threshold) continue;
 			  restorecasing(tab[i].form(),tab[i].form(),formcasing);
-			  p += sprintf(p," %s%s,%1.2f",output_field_prefix,tab[i].form(),tab[i].w_suf());
+			  p += sprintf(p," %s%s",output_field_prefix,tab[i].form());
+			  if(show_scores) {
+			    p += sprintf(p,",%1.2f",tab[i].w_suf());
+			  }
 			}
 		      sprintf(p,"\n");
@@ -115,9 +126,12 @@
 		      char* p=corfield;
 		      p += sprintf(p," %s",output_field_prefix);
-		      for(int i=tab.count()-1; i >= 0; --i)
+		      for(int i=tab.count()-1; i >= tab.count()-max_cnt; --i)
 			{
 			  if(tab[i].w_suf() > threshold) continue;
 			  restorecasing(tab[i].form(),tab[i].form(),formcasing);
-			  p += sprintf(p,(i==0)?"%s,%1.2f":";%s,%1.2f",tab[i].form(),tab[i].w_suf());
+			  p += sprintf(p,(i==0)?"%s":";%s",tab[i].form());
+			  if(show_scores) {
+			    p += sprintf(p,",%1.2f",tab[i].w_suf());
+			  }
 			}
 		      
@@ -131,9 +145,14 @@
 		  else
 		    {
-		      for(int i=tab.count()-1; i >= 0; --i)
+		      for(int i=tab.count()-1; i >= tab.count()-max_cnt; --i)
 			{
 			  if(tab[i].w_suf() > threshold) continue;
 			  restorecasing(tab[i].form(),tab[i].form(),formcasing);
-			  sprintf(corfield," %s%s,%1.2f\n",output_field_prefix,tab[i].form(),tab[i].w_suf());
+			  char* p = corfield;
+			  p += sprintf(p," %s%s",output_field_prefix,tab[i].form());
+			  if(show_scores) {
+				p += sprintf(p,",%1.2f",tab[i].w_suf());
+			  }
+			  p += sprintf(p, "\n");
 			  strcpy(outline,line);
 			  outline[strlen(outline)-1]='\0';
