romasha ali

romasha ali

  • NA
  • 94
  • 38.3k

if condition is not executing

Feb 18 2017 6:14 PM
hi,
if condition is not executing here is my code
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace porter_s_algo
{
class Program
{
static void Main(string[] args)
{ string builder="";
StreamReader read = new StreamReader(@"C:\Users\Romesha\documents\visual studio 2013\Projects\porter's algo\porter's algo\Properties\TextFile1.txt");
string save;
while ((save = read.ReadLine()) != null)
{
Console.WriteLine(@"--------THIS IS A ORIGINAL CORPUS--------"+"\n"+"{0}",save);
builder += save.Replace("tional", "te").Replace("tive", "te").Replace("est", "").Replace("ion", "e").Replace("ed", "");
}
if ((builder == "a") || (builder == "i") || (builder == "e") || (builder == "o") || (builder == "u"))
builder += builder.Replace("ing", "");
Console.WriteLine("--------CORPUS AFTER STEMMING--------- "+"\n"+"{0}",builder);
Console.ReadLine();
}
}
}
 

Answers (7)