Created
July 30, 2015 18:54
-
-
Save tking16/7109b3cc18db9334178c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
namespace TheoKingEuroMoneyTest | |
{ | |
public partial class WebForm1 : System.Web.UI.Page | |
{ | |
int NegativeWordcount; | |
int results; | |
string negativeWords; | |
List<String> NegativeWordList; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
NegativeWordList = new List<string>(); | |
string Phrase = "The weather in Manchester in winter is bad. It rains all the time - it must be horrible for people visiting."; | |
PhraseTextBox.Text = Phrase; | |
NegativeWordList.Add("bad"); | |
NegativeWordList.Add("horrible"); | |
foreach (var words in NegativeWordList) | |
{ | |
NegativeWordcount+= NegativeWordCounter.countNegativeWords(Phrase, words); | |
results = NegativeWordcount; | |
} | |
ScannedResults.Text = "Total Number of negative words: " + results; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment