internal static POSSample CreatePredSample() { const string sentence = "the_DT stories_NNS about_NNS well-heeled_JJ " + "communities_NNS and_CC developers_CC"; return(POSSample.Parse(sentence)); }
public void TestParse() { const string sentence = "the_DT stories_NNS about_IN well-heeled_JJ " + "communities_NNS and_CC developers_NNS"; var sample = POSSample.Parse(sentence); Assert.AreEqual(sentence, sample.ToString()); }
public void TestParseEmptyString() { var sample = POSSample.Parse(string.Empty); Assert.AreEqual(0, sample.Sentence.Length); Assert.AreEqual(0, sample.Tags.Length); var value = sample.ToString(); Assert.IsEmpty(value); }
public void TestOutcomesForSingleSentence() { const string sentence = "That_DT sounds_VBZ good_JJ ._."; var sample = POSSample.Parse(sentence); var eventStream = new POSSampleEventStream(new GenericObjectStream <POSSample>(sample)); Assert.AreEqual("DT", eventStream.Read().Outcome); Assert.AreEqual("VBZ", eventStream.Read().Outcome); Assert.AreEqual("JJ", eventStream.Read().Outcome); Assert.AreEqual(".", eventStream.Read().Outcome); Assert.Null(eventStream.Read()); }
public void TestParseWithError() { Assert.Throws <InvalidFormatException> (() => { POSSample.Parse("the_DT stories"); }); }
public void TestParseEmptyToken() { var sample = POSSample.Parse("the_DT _NNS"); Assert.AreEqual(string.Empty, sample.Sentence[1]); }
public void TestParseEmptyTag() { var sample = POSSample.Parse("the_DT stories_"); Assert.AreEqual(string.Empty, sample.Tags[1]); }
public void TestParseWithError() { POSSample.Parse("the_DT stories"); }