def is_highlink_density(self, element):
links = self.parser.getElementsByTag(element, tag='<STR_LIT:a>')<EOL>if not links:<EOL><INDENT>return False<EOL><DEDENT>text = self.parser.getText(element)<EOL>words = text.split('<STR_LIT:U+0020>')<EOL>words_number = float(len(words))<EOL>link_text_parts = []<EOL>for link in links:<EOL><INDENT>link_text_parts.append(self.parser.getText(link))<EOL><DEDENT>link_text = '<STR_LIT>'.join(link_text_parts)<EOL>link_words = link_text.split('<STR_LIT:U+0020>')<EOL>number_of_link_words = float(len(link_words))<EOL>number_of_links = float(len(links))<EOL>link_divisor = float(number_of_link_words / words_number)<EOL>score = float(link_divisor * number_of_links)<EOL>if score >= <NUM_LIT:1.0>:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
checks the density of links within a node,
is there not much text and most of it contains linky shit?
if so it's no good