<commit_before>F = require \fs
_ = require \underscore
C = require \../../collection
H = require \../../helper
I = require \../../lib-3p/insert-css
E = require \./edge-glyph
N = require \./node-bberg

I F.readFileSync __dirname + \/edge-bberg.css

exports
  ..filter-out = (edges) ->
    @steer-edges = _.groupBy edges, ->
      if it.how is \member
      and (N.is-steering it.source or N.is-steering it.target)
      then \yes else \no
    steer-nodes = _.map @steer-edges.yes, ->
      if N.is-steering it.source then it.target else it.source
    @attend-edges = _.groupBy @steer-edges.no, ->
      if (N.is-conference-yyyy it.source or N.is-conference-yyyy it.target) then
        s = _.find steer-nodes, (x) -> x._id in [it.source._id, it.target._id]
        if !!s then \discard else \yes
      else \no
    return @attend-edges.no

  ..render-attend = (g, d3-force) ->
    @g-attend = render g, d3-force, @attend-edges.yes,
      N.is-annual-conference, N.is-conference-yyyy, \bberg-attend

  ..render-steer = (g, d3-force) ->
    edges = @steer-edges.yes
    @g-steer = render g, d3-force, edges, N.is-steering, N.is-steering, \bberg-steer
    glyphs = g.selectAll \g.edge-glyphs
      .data @steer-edges.yes
      .enter!append \svg:g
        .attr \class, \edge-glyphs
    glyphs.each E.append
    glyphs.attr \transform E.get-transform

  ..render-clear = -><commit_msg>fix bberg edge glyph pos regression<commit_after>F = require \fs
_ = require \underscore
C = require \../../collection
H = require \../../helper
I = require \../../lib-3p/insert-css
E = require \./edge-glyph
N = require \./node-bberg

I F.readFileSync __dirname + \/edge-bberg.css

exports
  ..filter-out = (edges) ->
    @steer-edges = _.groupBy edges, ->
      if it.how is \member
      and (N.is-steering it.source or N.is-steering it.target)
      then \yes else \no
    steer-nodes = _.map @steer-edges.yes, ->
      if N.is-steering it.source then it.target else it.source
    @attend-edges = _.groupBy @steer-edges.no, ->
      if (N.is-conference-yyyy it.source or N.is-conference-yyyy it.target) then
        s = _.find steer-nodes, (x) -> x._id in [it.source._id, it.target._id]
        if !!s then \discard else \yes
      else \no
    return @attend-edges.no

  ..render-attend = (g, d3-force) ->
    @g-attend = render g, d3-force, @attend-edges.yes,
      N.is-annual-conference, N.is-conference-yyyy, \bberg-attend

  ..render-steer = (g, d3-force) ->
    edges = @steer-edges.yes
    @g-steer = render g, d3-force, edges, N.is-steering, N.is-steering, \bberg-steer
    glyphs = @g-steer.selectAll \g.edge-glyphs
      .data @steer-edges.yes
      .enter!append \svg:g
        .attr \class, \edge-glyphs
    glyphs.each E.append
    glyphs.attr \transform E.get-transform

  ..render-clear = ->
{'fraction_non_alphanumeric': 0.16123253314224292, 'fraction_numerical': 0.0035829451809387316, 'mean_word_length': 2.235225955967555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5741019', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1036, 'n_words': 249}