<commit_before># encoding: UTF-8
require "spec_helper"

describe "rGreek" do
  it "should do exist" do
    Lemma.new.should_not be_nil
    Parse.new.should_not be_nil    
  end
  
  it "should get all parses for a lemma" do
    lemma = Lemma.find_by_headword "kai/"
    parses = Parse.find_all_by_lemma_id lemma.id
    puts parses.to_yaml
    parses.length.should == 1
  end
end<commit_msg>updated database to be more user friendly; hit cunundrum of bad mapping between lemma_id and lemma (le/gw matches sulle/gw) - not sure what to do<commit_after># encoding: UTF-8
require "spec_helper"

describe "rGreek" do
  it "should do exist" do
    Lemma.new.should_not be_nil
    Parse.new.should_not be_nil    
  end
  
  it "should get all parses for kai/" do
    lemma = Lemma.find_by_headword "kai/"
    parses = Parse.find_all_by_lemma_id lemma.id
    parses.length.should == 5
  end
  
  it "should get all parses for le/gw" do
    lemma = Lemma.find_by_headword "le/gw"
    parses = Parse.where("lemma_id = ?", lemma.id)
    puts parses.to_yaml
    parses.length.should == 5
  end
end
{'fraction_non_alphanumeric': 0.08394833948339483, 'fraction_numerical': 0.004612546125461255, 'mean_word_length': 3.1412213740458017, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6231779', 'n_tokens_mistral': 408, 'n_tokens_neox': 391, 'n_words': 116}