<commit_before>Spine = require 'spine'
GalaxyZooSubject = require 'models/galaxy_zoo_subject'
Classification = require 'models/classification'

class Classify extends Spine.Controller
  elements:
    '.tree .question': 'question'
  
  events:
    'click .tree .answer': 'answer'
  
  constructor: ->
    super
    GalaxyZooSubject.bind 'fetched', @nextSubject
    GalaxyZooSubject.next()
  
  active: ->
    super
    @render()
  
  render: ->
    return unless @subject
    @html require('views/classify')(@)
  
  nextSubject: =>
    @subject = GalaxyZooSubject.current
    @classification = Classification.create subject_id: @subject.id
    @render()
  
  answer: ({ originalEvent: e }) -><commit_msg>Minor fix<commit_after>Spine = require 'spine'
GalaxyZooSubject = require 'models/galaxy_zoo_subject'
Classification = require 'models/classification'

class Classify extends Spine.Controller
  elements:
    '.tree .question': 'question'
  
  events:
    'click .tree .answer a': 'answer'
  
  constructor: ->
    super
    GalaxyZooSubject.bind 'fetched', @nextSubject
    GalaxyZooSubject.next()
  
  active: ->
    super
    @render()
  
  render: ->
    return unless @subject
    @html require('views/classify')(@)
  
  nextSubject: =>
    @subject = GalaxyZooSubject.current
    @classification = Classification.create subject_id: @subject.id
    @render()
  
  answer: ({ originalEvent: e }) ->
{'fraction_non_alphanumeric': 0.11965811965811966, 'fraction_numerical': 0.0, 'mean_word_length': 3.4321766561514195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3604375', 'n_tokens_mistral': 444, 'n_tokens_neox': 439, 'n_words': 98}