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();
}
}
}
7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rafnas T PPosted Feb 19, 2017, 10:36 PM
Nitin SontakkePosted Feb 19, 2017, 10:15 PM
Bryian TanPosted Feb 19, 2017, 6:08 PM
Tapan PatelPosted Feb 19, 2017, 3:19 PM
romasha aliPosted Feb 19, 2017, 12:44 PM
Nitin SontakkePosted Feb 18, 2017, 9:38 PM
Catcher WongPosted Feb 18, 2017, 9:33 PM