public void Crap() { SynonymEngine engine = new SynonymEngine(); char[] term = "Crap".ToCharArray(); var result = engine.GetSynonyms(term, term.Length); Assert.IsNull(result); }
public void UnitType_Apt() { SynonymEngine engine = new SynonymEngine(); char[] term = "Apt".ToCharArray(); var result = engine.GetSynonyms(term, term.Length); Assert.IsNotNull(result); Assert.AreEqual(2, result.Count()); }
public SynonymFilter (TokenStream input, SynonymEngine engine) : base(input) { if (engine == null) throw new ArgumentNullException("synonymEngine"); synonymStack = new Stack<string>(); this.engine = engine; this.termAtt = (TermAttribute)AddAttribute<ITermAttribute>(); this.posIncrAtt = (PositionIncrementAttribute)AddAttribute<IPositionIncrementAttribute>(); //this.termAtt = this.AddAttribute<string>(); //this.posIncrAtt = this.AddAttribute<string>(); }
public SynonymFilter(TokenStream input, SynonymEngine engine) : base(input) { if (engine == null) { throw new ArgumentNullException("synonymEngine"); } synonymStack = new Stack <string>(); this.engine = engine; this.termAtt = (TermAttribute)AddAttribute <ITermAttribute>(); this.posIncrAtt = (PositionIncrementAttribute)AddAttribute <IPositionIncrementAttribute>(); //this.termAtt = this.AddAttribute<string>(); //this.posIncrAtt = this.AddAttribute<string>(); }
public SynonymAnalyzer(SynonymEngine engine) { this.engine = engine; }
public void Null() { SynonymEngine engine = new SynonymEngine(); var result = engine.GetSynonyms(null, 0); Assert.IsNull(result); }