public static void main(String args[] )
	{
	Paice p = new Paice(args[2],args[3]);
	String text;
	StringTokenizer line = new StringTokenizer("");
	String output ="";
	String fileOut= args[1];
	String fileIn = args[0];


	try
		{
		FileWriter fw = new FileWriter(fileOut);
		BufferedWriter bw = new BufferedWriter(fw);

		FileReader fr = new FileReader(fileIn);
		BufferedReader br = new BufferedReader(fr);
		try
			{
			while ((text=br.readLine())!= null)
				{
				line= new StringTokenizer(text);
				try
					{
					while (line.hasMoreTokens())
						{
						// read word from line and stem word
						String word = new String();
						word = line.nextToken();
						bw.write(p.stripAffixes(word)+ " ");
						}
					bw.newLine();
					}
				catch(Exception e)
					{
					System.err.println(e);
					}
				}
			}
		catch(Exception e)
			{
			System.err.println("File Error Durring Reading "+e);
			System.exit(0);
			}
			// try to close file, file is not needed again so if can't close don't exit
		try
			{
			fr.close();
			}
		catch(Exception e)
			{
			System.err.println("Error Closing File During Reading " + e);
			}
		try
			{
			bw.close();
			}
		catch(Exception e)
			{
			System.err.println(e);
			}

		}
	catch(Exception e)
		{
		System.err.println("File Not Found " + args[0] + " exception " + e);
		System.exit(1);
		}
	}//main