NBoilerpipe.Document.TextBlock.MergeNext C# (CSharp) Method

MergeNext() public method

public MergeNext ( NBoilerpipe other ) : void
other NBoilerpipe
return void
        public virtual void MergeNext(NBoilerpipe.Document.TextBlock other)
        {
            StringBuilder sb = new StringBuilder ();
            sb.Append (text);
            sb.Append ('\n');
            sb.Append (other.text);
            this.text = sb.ToString ();
            numWords += other.numWords;
            numWordsInAnchorText += other.numWordsInAnchorText;
            numWordsInWrappedLines += other.numWordsInWrappedLines;
            numWrappedLines += other.numWrappedLines;
            offsetBlocksStart = Math.Min (offsetBlocksStart, other.offsetBlocksStart);
            offsetBlocksEnd = Math.Max (offsetBlocksEnd, other.offsetBlocksEnd);
            InitDensities ();
            this.isContent |= other.isContent;
            if (containedTextElements == null) {
                containedTextElements = (BitSet)other.containedTextElements.Clone ();
            } else {
                containedTextElements.Or (other.containedTextElements);
            }
            numFullTextWords += other.numFullTextWords;
            if (other.labels != null) {
                if (labels == null) {
                    labels = new HashSet<string> (other.labels);
                } else {
                    Sharpen.Collections.AddAll (labels, other.labels);
                }
            }
            tagLevel = Math.Min (tagLevel, other.tagLevel);
        }