private void ShufflePAST_DE_UnitToBeforeMDBKUnit() { if (_bKBySentenceDecorator.NNUnitBeforeBkBy( _bKBySentenceDecorator.TextsBeforeBy)) { int nnPosition = _bKBySentenceDecorator.NNPosition; if (_bKBySentenceDecorator.IsPASTUnitBetweenNNandBKBy( _bKBySentenceDecorator.TextsBeforeBy, nnPosition)) { // remove PAST+de int pastPosition = _bKBySentenceDecorator .GetFirstPASTUnitPositionAfterNN( _bKBySentenceDecorator, nnPosition) + nnPosition; var PAST_deUnit = _bKBySentenceDecorator.Texts.GetRange( pastPosition, _bKBySentenceDecorator.Texts[pastPosition].pe_merge_ahead + 1); _bKBySentenceDecorator.Texts.RemoveRange( pastPosition, _bKBySentenceDecorator.Texts[pastPosition].pe_merge_ahead + 1); // insert PAST+de before mdbk _bKBySentenceDecorator.Texts.InsertRange( _bKBySentenceDecorator.GetMDBKPosition(_bKBySentenceDecorator.Texts), PAST_deUnit); } } }
private void ApplyDeParticlesWhereNNThenPASTThenBKBy(BKBySentenceDecorator bKBySentenceDecorator) { var textsBeforeBy = bKBySentenceDecorator.TextsBeforeBy; if (bKBySentenceDecorator.NNUnitBeforeBkBy(textsBeforeBy)) { int nnPosition = bKBySentenceDecorator.NNPosition; if (bKBySentenceDecorator.IsPASTUnitBetweenNNandBKBy(textsBeforeBy, nnPosition)) { DeParticleHelper.InsertDeParticleBeforeAndUnderline( bKBySentenceDecorator, nnPosition); int pastPosition = bKBySentenceDecorator .GetFirstPASTUnitPositionAfterNN( bKBySentenceDecorator, nnPosition); DeParticleHelper.InsertDeParticleAfterAndUnderline( bKBySentenceDecorator, pastPosition + 1); } } }