<commit_before>import Ember from 'ember';
import Base from 'ember-validations/validators/base';
import { definitionlike } from './definitionlike';
import { generic } from './generic';
import { sentencelike } from './sentencelike'

export default Base.extend({
  call() {
    var changes = this.model.get(this.property);
    var seqError = false;
    var meaningError = false;
    if(Ember.isEmpty(changes.seqs)) {
      this.errors.addObject("Must have at least one valid spelling.");
    } else {
      for(var i = 0; i < changes.seqs.length; i++) {
        var seq = changes.seqs[i];
        if(Ember.isBlank(seq.text) || (seq.text.length === 0)) {
          seqError = true;
        }
        if(seq.proposal_id) {
          seqError = true;
        }
      }
    }
    console.log("Made it here")
    if(Ember.isEmpty(changes.meanings)) {
      this.errors.addObject("Must have at least one valid meaning.");
    } else {
      for(var i = 0; i < changes.meanings.length; i++) {

        var meaning = changes.meanings[i];
        if( (generic(meaning.def) !== false ) ||
            (definitionlike(meaning.def, meaning.pos) !== false)) {
          console.log("def fail", meaning.def);
          meaningError = true;
        }
        if(sentencelike(meaning.example) !== false) {
          console.log("example fail", meaning.example);
          meaningError = true;
        }
      }
    }

    if(seqError) {
      this.errors.addObject("One of the spellings above is invalid");<commit_msg>Remove some excessive console lines<commit_after>import Ember from 'ember';
import Base from 'ember-validations/validators/base';
import { definitionlike } from './definitionlike';
import { generic } from './generic';
import { sentencelike } from './sentencelike'

export default Base.extend({
  call() {
    var changes = this.model.get(this.property);
    var seqError = false;
    var meaningError = false;
    if(Ember.isEmpty(changes.seqs)) {
      this.errors.addObject("Must have at least one valid spelling.");
    } else {
      for(var i = 0; i < changes.seqs.length; i++) {
        var seq = changes.seqs[i];
        if(Ember.isBlank(seq.text) || (seq.text.length === 0)) {
          seqError = true;
        }
        if(seq.proposal_id) {
          seqError = true;
        }
      }
    }
    if(Ember.isEmpty(changes.meanings)) {
      this.errors.addObject("Must have at least one valid meaning.");
    } else {
      for(var i = 0; i < changes.meanings.length; i++) {

        var meaning = changes.meanings[i];
        if( (generic(meaning.def) !== false ) ||
            (definitionlike(meaning.def, meaning.pos) !== false)) {
          meaningError = true;
        }
        if(sentencelike(meaning.example) !== false) {
          meaningError = true;
        }
      }
    }

    if(seqError) {
      this.errors.addObject("One of the spellings above is invalid");
{'fraction_non_alphanumeric': 0.14112343966712898, 'fraction_numerical': 0.0020804438280166435, 'mean_word_length': 2.3981154299175502, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '3920921', 'n_tokens_mistral': 890, 'n_tokens_neox': 864, 'n_words': 206}