<commit_before>require 'sinatra'
require 'marky_markov'
require 'pry' #testing purposes

get '/' do
	markov = MarkyMarkov::TemporaryDictionary.new
	markov.parse_file "jargon.txt"
	markov.parse_file "wiki.txt"
	@text_length =  params[:"text-length"]
	puts params
	if @text_length == "short" then
		@generated = markov.generate_n_sentences 1
	elsif @text_length == "medium" then
		@generated = markov.generate_n_sentences 5
	else 
		@generated = markov.generate_n_sentences 25
	end
	if request.xhr? then
		@generated 
	else 
		erb :index
	end
	
end

get '/style.css' do
	scss :"../stylesheets/style"
end<commit_msg>Changed tabs for spaces and number of generated sentences<commit_after>require 'sinatra'
require 'marky_markov'
require 'pry' #testing purposes

get '/' do
  markov = MarkyMarkov::TemporaryDictionary.new
  markov.parse_file "jargon.txt"
  markov.parse_file "wiki.txt"
  @text_length =  params[:"text-length"]

  if @text_length == "short" then
    @generated = markov.generate_n_sentences 5
  elsif @text_length == "medium" then
    @generated = markov.generate_n_sentences 15
  else 
    @generated = markov.generate_n_sentences 25
  end
  
  if request.xhr? then
    @generated 
  else 
    erb :index
  end
  
end

get '/style.css' do
  scss :"../stylesheets/style"
end
{'fraction_non_alphanumeric': 0.10428015564202335, 'fraction_numerical': 0.007003891050583658, 'mean_word_length': 4.123505976095617, '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': '5667050', 'n_tokens_mistral': 486, 'n_tokens_neox': 460, 'n_words': 113}