<commit_before>module Main where

import System.Environment (getProgName)

import qualified Kiwi.API as API
import qualified Kiwi.Config as Config
import qualified Kiwi.Generate as Generate
import qualified Kiwi.Server as Server
import qualified Kiwi.ServerAndAPI as ServerAndAPI
import Kiwi.Data
import qualified Kiwi.Storage as Storage
import qualified Data.Text as T


main :: IO ()
main = do
  target <- Config.target
  case target of
    Config.API -> API.main
    Config.Server -> Server.main
    Config.ServerAndAPI -> ServerAndAPI.main
    Config.Generate -> Generate.main<commit_msg>Create tables when they don't exist yet<commit_after>module Main where

import System.Environment (getProgName)

import qualified Kiwi.API as API
import qualified Kiwi.Config as Config
import qualified Kiwi.Generate as Generate
import qualified Kiwi.Server as Server
import qualified Kiwi.ServerAndAPI as ServerAndAPI
import Kiwi.Data
import qualified Kiwi.Storage as Storage
import qualified Data.Text as T

main :: IO ()
main = do
  Storage.createTablesIfNecessary
  target <- Config.target
  case target of
    Config.API -> API.main
    Config.Server -> Server.main
    Config.ServerAndAPI -> ServerAndAPI.main
    Config.Generate -> Generate.main
{'fraction_non_alphanumeric': 0.06275140788415125, 'fraction_numerical': 0.0, 'mean_word_length': 4.226890756302521, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6895952', 'n_tokens_mistral': 339, 'n_tokens_neox': 333, 'n_words': 126}