/** * <summary>The lastIGContainsCase method returns the MorphologicalTag of last inflectional group if it is one of the NOMINATIVE, * ACCUSATIVE, DATIVE, LOCATIVE or ABLATIVE cases, null otherwise.</summary> * * <returns>the MorphologicalTag of last inflectional group if it is one of the NOMINATIVE, * ACCUSATIVE, DATIVE, LOCATIVE or ABLATIVE cases, null otherwise.</returns> */ public string LastIGContainsCase() { MorphologicalTag caseTag = LastInflectionalGroup().ContainsCase(); if (caseTag != MorphologicalTag.NONE) { return(InflectionalGroup.GetTag(caseTag)); } return("NULL"); }
/** * <summary>The getTag method takes an {@link Integer} index as an input and and if the given index is 0, it directly return the root. * then, it loops through the inflectionalGroups {@link ArrayList} it returns the MorphologicalTag of the corresponding inflectional group.</summary> * * <param name="index">Integer input.</param> * <returns>the MorphologicalTag of the corresponding inflectional group, or null of invalid index inputs.</returns> */ public string GetTag(int index) { var size = 1; if (index == 0) { return(root.GetName()); } foreach (var group in inflectionalGroups) { if (index < size + group.Size()) { return(InflectionalGroup.GetTag(group.GetTag(index - size))); } size += group.Size(); } return(null); }
/** * <summary>The getRootPos method returns the MorphologicalTag of the first inflectional group.</summary> * * <returns>the MorphologicalTag of the first inflectional group.</returns> */ public string GetRootPos() { return(InflectionalGroup.GetTag(FirstInflectionalGroup().GetTag(0))); }
/** * <summary>The getWordWithPos method returns root with the MorphologicalTag of the first inflectional as a new word.</summary> * * <returns>root with the MorphologicalTag of the first inflectional as a new word.</returns> */ public Word GetWordWithPos() { return(new Word(root.GetName() + "+" + InflectionalGroup.GetTag(FirstInflectionalGroup().GetTag(0)))); }