public WordPart(Word word, int number_in_word, string buckwalter, string tag) { this.word = word; this.word.Parts.Add(this); this.number_in_word = number_in_word; this.buckwalter = buckwalter; this.text = buckwalter.ToArabic(); this.tag = tag; this.grammar = null; }
// copy constructor //Type Position Attribute Qualifier PersonDegree PersonGender PersonNumber Mood Lemma Root SpecialGroup public WordPartGrammar(WordPartGrammar grammar) { if (grammar != null) { this.word_part = grammar.WordPart; this.type = grammar.Type; this.position = grammar.Position; this.attribute = grammar.Attribute; this.qualifier = grammar.Qualifier; this.person_degree = grammar.PersonDegree; this.person_gender = grammar.PersonGender; this.person_number = grammar.PersonNumber; this.mood = grammar.Mood; this.lemma = grammar.Lemma; this.root = grammar.Root; this.special_group = grammar.SpecialGroup; } }
//Type Position Attribute Qualifier PersonDegree PersonGender PersonNumber Mood Lemma Root SpecialGroup // copy constructor public WordPartGrammar(WordPartGrammar grammar) { if (grammar != null) { this.word_part = grammar.WordPart; this.type = grammar.Type; this.position = grammar.Position; this.attribute = grammar.Attribute; this.qualifier = grammar.Qualifier; this.person_degree = grammar.PersonDegree; this.person_gender = grammar.PersonGender; this.person_number = grammar.PersonNumber; this.mood = grammar.Mood; this.lemma = grammar.Lemma; this.root = grammar.Root; this.special_group = grammar.SpecialGroup; } }
public WordPart(Word word, int number_in_word, string buckwalter, string tag, WordPartGrammar grammar) : this(word, number_in_word, buckwalter, tag) { this.grammar = new WordPartGrammar(grammar); }