def build(self, text, matrix, skim_depth=<NUM_LIT:10>, d_weights=False):
for anchor in bar(matrix.keys):<EOL><INDENT>n1 = text.unstem(anchor)<EOL>pairs = matrix.anchored_pairs(anchor).items()<EOL>for term, weight in list(pairs)[:skim_depth]:<EOL><INDENT>if d_weights: weight = <NUM_LIT:1>-weight<EOL>n2 = text.unstem(term)<EOL>self.graph.add_edge(n1, n2, weight=float(weight))<EOL><DEDENT><DEDENT>
1. For each term in the passed matrix, score its KDE similarity with
all other indexed terms.

2. With the ordered stack of similarities in hand, skim off the top X
pairs and add them as edges.

Args:
    text (Text): The source text instance.
    matrix (Matrix): An indexed term matrix.
    skim_depth (int): The number of siblings for each term.
    d_weights (bool): If true, give "close" words low edge weights.