/// <summary>Return all the PartOfSpeechBuilders descended from this that have indexes between <paramref name="start"/> and <paramref name="end"/>, non-inclusive.</summary> internal IEnumerable <PartOfSpeechBuilder> PartsOfSpeechInSubtreeBetween(PartOfSpeechBuilder start, PartOfSpeechBuilder end) => GetElementsOfTypeInSubtree <PartOfSpeechBuilder>() .Where(posb => posb.ComesAfter(start) && posb.ComesBefore(end));
/// <summary>Return the index of <paramref name="partOfSpeech"/> within the subtree of this</summary> public int RelativeIndexOf(PartOfSpeechBuilder partOfSpeech) => GetElementsOfTypeInSubtree <PartOfSpeechBuilder>() .OrderBy(partOfSpeech => partOfSpeech) .ToList() .IndexOf(partOfSpeech) + 1;