File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,15 @@ def merge_next(other)
7474 end
7575
7676 def to_s
77- # "[" + offsetBlocksStart + "-" + offsetBlocksEnd + ";tl=" + tagLevel + "; nw=" + numWords + ";nwl=" + numWrappedLines + ";ld=" + linkDensity + "]\t" + (isContent ? "CONTENT" : "boilerplate") + "," + labels + "\n" + getText();
78- labels = 'null'
79- if !@labels . empty?
80- labels = "[#{ @labels . to_a . join ( ',' ) } ]"
77+ "[#{ @offset_blocks_start } -#{ @offset_blocks_end } ;tl=#{ @tag_level } ; nw=#{ @num_words } ;nwl=#{ @num_wrapped_lines } ;ld=#{ @link_density } ]\t #{ is_content? ? 'CONTENT' : 'BOILERPLATE' } ,#{ labels_to_s } \n #{ text } "
78+ end
79+
80+ def labels_to_s
81+ if @labels . empty?
82+ 'null'
83+ else
84+ "[#{ @labels . to_a . join ( ',' ) } ]"
8185 end
82- "[#{ @offset_blocks_start } -#{ @offset_blocks_end } ;tl=#{ @tag_level } ; nw=#{ @num_words } ;nwl=#{ @num_wrapped_lines } ;ld=#{ @link_density } ]\t #{ is_content? ? 'CONTENT' : 'BOILERPLATE' } ,#{ labels } \n #{ text } "
8386 end
8487
8588 def clone
You can’t perform that action at this time.
0 commit comments