#!/usr/bin/perl


open(RH,"<synonym-en.txt");

	while(<RH>){
		
		my $string	= $_;
		
		chomp($string);

		$string		=~ s/^\s+//;
		$strlen		= length $string;

		next if ( $strlen == 0 );
		
		if ( $string !~ /,/g ) {
			$mainword = $string; 
		} else {
			
			$string =~ s/ , /,/ig; $string =~ s/ ,/,/ig; $string =~ s/, /,/ig;
			$string	=~ s/\s+/ /;
			if ( $string !~ /\w+\./ ) {
				print "$mainword,$string\n";
			};

		}; 
		

	# print "[$strlen] $string\n";
	# sleep 1;

	}; # while(<RH>){

close RH;