<commit_before># encoding: UTF-8

describe Borrowing do

  before :all do
    @en_GB = Borrowing.new 'localhost:9292', 'en_GB'
    @en_US = Borrowing.new 'localhost:9292', 'en_US'
  end

  context '#autocorrect' do

    it 'autocorrects a sentence’s spelling' do
      @en_GB.autocorrect('sanitised aluminum').should == 'sanitised aluminium'
      @en_US.autocorrect('sanitised aluminum').should == 'sanitized aluminum'
    end

  end

  context '#check' do

    it 'checks a sentence’s spelling' do
      @en_GB.check('colour of magic').should be_true
      @en_US.check('colour of magic').should be_false
    end

  end

  context '#dicts' do

    it 'returns the available dictionaries' do
      @en_GB.dicts.should == ['en', 'en_CA', 'en_GB', 'en_US']
    end

  end

  context '#errors' do

    it 'finds misspelled words in sentences' do
      @en_GB.errors('a sentence wtih smoe errors').should == ['wtih', 'smoe']
    end

  end

  context '#suggest' do

    it 'suggests alternative spellings for a given word' do
      @en_GB.suggest('rewolutionary').should == ['revolutionary', 'evolutionary', 'reflationary', "revolutionary's"]
    end

  end

end<commit_msg>s/context/describe in method specs<commit_after># encoding: UTF-8

describe Borrowing do

  before :all do
    @en_GB = Borrowing.new 'localhost:9292', 'en_GB'
    @en_US = Borrowing.new 'localhost:9292', 'en_US'
  end

  describe '#autocorrect' do

    it 'autocorrects a sentence’s spelling' do
      @en_GB.autocorrect('sanitised aluminum').should == 'sanitised aluminium'
      @en_US.autocorrect('sanitised aluminum').should == 'sanitized aluminum'
    end

  end

  describe '#check' do

    it 'checks a sentence’s spelling' do
      @en_GB.check('colour of magic').should be_true
      @en_US.check('colour of magic').should be_false
    end

  end

  describe '#dicts' do

    it 'returns the available dictionaries' do
      @en_GB.dicts.should == ['en', 'en_CA', 'en_GB', 'en_US']
    end

  end

  describe '#errors' do

    it 'finds misspelled words in sentences' do
      @en_GB.errors('a sentence wtih smoe errors').should == ['wtih', 'smoe']
    end

  end

  describe '#suggest' do

    it 'suggests alternative spellings for a given word' do
      @en_GB.suggest('rewolutionary').should == ['revolutionary', 'evolutionary', 'reflationary', "revolutionary's"]
    end

  end

end
{'fraction_non_alphanumeric': 0.12331081081081081, 'fraction_numerical': 0.007601351351351352, 'mean_word_length': 3.403345724907063, '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': '5683617', 'n_tokens_mistral': 870, 'n_tokens_neox': 791, 'n_words': 224}