<commit_before>
Parser = require "./parser"
Clip   = require "./clip"

p = new Parser()
#p.parse("text:$name| filter({name:age>5 && person.age(item.name) >6}) | json(five)")
#p.parse("text: messages.length() > 0 ? hello : crap")
#p.parse("css: {'test-name':hello}; text: world")
#p.parse("each: children | filter({ age: { $gt:  } })")
#p.parse("each: children | filter(filt) | json()")

#expressions = []
#for i in [0..1000]
#  expressions.push p.parse("text: name | filter(name.length() > 5, test | filter(abcde)) | cat(name); css: craig")


expr = p.parse("text: person.name() | filter(person) ? true : false")


clip = new Clip({ person: { count: 1, name: "craig" }}, {
  modifiers: {
    localize: (value) -> "ching chong!",
    append: (value, text) -> value + text
    capitalize: (value, count) -> String(value).toUpperCase()
    negate: (value) -> 
      -value
  }
})
<commit_msg>don't call if cv isn't a function<commit_after>
Parser = require "./parser"
Clip   = require "./clip"

p = new Parser()
#p.parse("text:$name| filter({name:age>5 && person.age(item.name) >6}) | json(five)")
#p.parse("text: messages.length() > 0 ? hello : crap")
#p.parse("css: {'test-name':hello}; text: world")
#p.parse("each: children | filter({ age: { $gt:  } })")
#p.parse("each: children | filter(filt) | json()")

#expressions = []
#for i in [0..1000]
#  expressions.push p.parse("text: name | filter(name.length() > 5, test | filter(abcde)) | cat(name); css: craig")


expr = p.parse("text: person.name().fish ? true : false")


clip = new Clip({ person: { count: 1, name: "craig" }}, {
  modifiers: {
    localize: (value) -> "ching chong!",
    append: (value, text) -> value + text
    capitalize: (value, count) -> String(value).toUpperCase()
    negate: (value) -> 
      -value
  }
})

{'fraction_non_alphanumeric': 0.22284434490481522, 'fraction_numerical': 0.011198208286674132, 'mean_word_length': 3.909340659340659, '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': '3778607', 'n_tokens_mistral': 677, 'n_tokens_neox': 650, 'n_words': 163}