Exemplo n.º 1
0
        internal void Fix()
        {
            var gender = new Gender();

            gender.AddRule("\\b([Dd])e MEAK", "$1a MEAK");
            gender.AddRule("\\bEm MEAK", "Na MEAK");
            gender.AddRule("\\bem MEAK", "na MEAK");

            foreach (var block in Story.BlockList)
            {
                foreach (var teller in block.TellerList)
                {
                    foreach (var piece in teller.Pieces)
                    {
                        preFix(piece);
                        piece.Text = gender.Remove(piece.Text);
                    }
                }

                foreach (var talk in block.TalkList)
                {
                    foreach (var piece in talk.Pieces)
                    {
                        var hasGenderFix = Story.HasGenderFix(piece.Style, talk.Character);

                        if (hasGenderFix)
                        {
                            piece.Text = gender.Remove(piece.Text);
                        }
                    }
                }
            }
        }