/// <summary> /// Creates a new UnigramSwumBuilder with the predefined set of rules. /// </summary> public UnigramSwumBuilder() : base() { this.PosData = new PCKimmoPartOfSpeechData(); this.Tagger = new UnigramTagger(); this.Splitter = new ConservativeIdSplitter(); }
/// <summary> /// Creates a new UnigramMethodRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public UnigramMethodRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) { this.PosData = posData; this.PosTagger = tagger; this.Splitter = splitter; InitializeMembers(); }
/// <summary> /// Creates a new UnigramMethodRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> /// <param name="specialWords">A list of words that indicate the method name needs special handling.</param> /// <param name="booleanArgumentVerbs">A list of verbs that indicate that the boolean arguments to a method should be included in the UnknownArguments list.</param> /// <param name="nounPhraseIndicators">A list of word that indicate that beginning of a noun phrase.</param> /// <param name="positionalFrequencies">Positional frequency data.</param> public UnigramMethodRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter, HashSet <string> specialWords, HashSet <string> booleanArgumentVerbs, HashSet <string> nounPhraseIndicators, PositionalFrequencies positionalFrequencies) { this.PosData = posData; this.PosTagger = tagger; this.Splitter = splitter; this.SpecialWords = specialWords; this.BooleanArgumentVerbs = booleanArgumentVerbs; this.NounPhraseIndicators = nounPhraseIndicators; this.PositionalFrequencies = positionalFrequencies; }
/// <summary> /// Creates a new PhraseNode that contains the words resulting from splitting the given identifier. /// </summary> /// <param name="id">A program identifier.</param> /// <param name="splitter">An IdSplitter to split the given identifier into words.</param> public PhraseNode(string id, IdSplitter splitter) : this() { string[] words; if(splitter != null) { words = splitter.Split(id); } else { words = new string[] { id }; } InitWords(words); }
/// <summary> /// Creates a new UnigramRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public UnigramRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) { this.PosData = posData; this.PosTagger = tagger; this.Splitter = splitter; }
/// <summary> /// Creates a new CheckerRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public CheckerRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new FieldRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public FieldRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new UnigramRule using default values. /// </summary> public UnigramRule() { this.PosData = new PCKimmoPartOfSpeechData(); this.PosTagger = new UnigramTagger(this.PosData); this.Splitter = new ConservativeIdSplitter(); }
/// <summary> /// Creates a new NonBaseVerbRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public NonBaseVerbRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new NounPhraseRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public NounPhraseRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new DestructorRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public DestructorRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Parses the node's Name into words. /// </summary> /// <param name="splitter"></param> public virtual void Parse(IdSplitter splitter) { if(ParsedName == null) ParsedName = new PhraseNode(Name, splitter); }
/// <summary> /// Creates a new ProgramElementNode and sets Name to the supplied value. Name is then parsed using the supplied IdSplitter. /// </summary> /// <param name="name">The name of the program element.</param> /// <param name="splitter">An IdSplitter to use to parse the name.</param> public ProgramElementNode(string name, IdSplitter splitter) : this(name) { Parse(splitter); }
/// <summary> /// Creates a new SpecialCaseRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public SpecialCaseRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new ReactiveRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public ReactiveRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new LeadingPrepositionRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public LeadingPrepositionRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new EmptyNameRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public EmptyNameRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new BaseVerbRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public BaseVerbRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new ConstructorRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public ConstructorRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new EventHandlerRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> public EventHandlerRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter) : base(posData, tagger, splitter) { }
/// <summary> /// Creates a new NonBaseVerbRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> /// <param name="specialWords">A list of words that indicate the method name needs special handling.</param> /// <param name="booleanArgumentVerbs">A list of verbs that indicate that the boolean arguments to a method should be included in the UnknownArguments list.</param> /// <param name="nounPhraseIndicators">A list of word that indicate that beginning of a noun phrase.</param> /// <param name="positionalFrequencies">Positional frequency data.</param> public NonBaseVerbRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter, HashSet<string> specialWords, HashSet<string> booleanArgumentVerbs, HashSet<string> nounPhraseIndicators, PositionalFrequencies positionalFrequencies) : base(posData, tagger, splitter, specialWords, booleanArgumentVerbs, nounPhraseIndicators, positionalFrequencies) { }
/// <summary> /// Creates a new UnigramMethodRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> /// <param name="specialWords">A list of words that indicate the method name needs special handling.</param> /// <param name="booleanArgumentVerbs">A list of verbs that indicate that the boolean arguments to a method should be included in the UnknownArguments list.</param> /// <param name="nounPhraseIndicators">A list of word that indicate that beginning of a noun phrase.</param> /// <param name="positionalFrequencies">Positional frequency data.</param> public UnigramMethodRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter, HashSet<string> specialWords, HashSet<string> booleanArgumentVerbs, HashSet<string> nounPhraseIndicators, PositionalFrequencies positionalFrequencies) { this.PosData = posData; this.PosTagger = tagger; this.Splitter = splitter; this.SpecialWords = specialWords; this.BooleanArgumentVerbs = booleanArgumentVerbs; this.NounPhraseIndicators = nounPhraseIndicators; this.PositionalFrequencies = positionalFrequencies; }
/// <summary> /// Creates a new CheckerRule. /// </summary> /// <param name="posData">The part-of-speech data to use.</param> /// <param name="tagger">The part-of-speech tagger to use.</param> /// <param name="splitter">The identifier splitter to use.</param> /// <param name="specialWords">A list of words that indicate the method name needs special handling.</param> /// <param name="booleanArgumentVerbs">A list of verbs that indicate that the boolean arguments to a method should be included in the UnknownArguments list.</param> /// <param name="nounPhraseIndicators">A list of word that indicate that beginning of a noun phrase.</param> /// <param name="positionalFrequencies">Positional frequency data.</param> public CheckerRule(PartOfSpeechData posData, Tagger tagger, IdSplitter splitter, HashSet <string> specialWords, HashSet <string> booleanArgumentVerbs, HashSet <string> nounPhraseIndicators, PositionalFrequencies positionalFrequencies) : base(posData, tagger, splitter, specialWords, booleanArgumentVerbs, nounPhraseIndicators, positionalFrequencies) { }