<commit_before>{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards #-}

module NGramCrackers.Parsers.Args
( optionHandler
, myModes
, exec
) where

import System.Console.CmdArgs
import System.Exit
import Control.Monad (unless, when)

import qualified System.IO    as SIO
import qualified Data.Text.IO as TIO
import qualified Data.Text    as T
import qualified Data.List    as DL (map, concat, concatMap)

import NGramCrackers.DataTypes
import NGramCrackers.NGramCrackers
import NGramCrackers.Ops.Infixes
import NGramCrackers.Ops.Pretty
import NGramCrackers.Ops.Retyped
import NGramCrackers.Parsers.Paragraph
import NGramCrackers.Quant.Counts
import NGramCrackers.Quant.Stats
import NGramCrackers.Utilities.Tuple
import NGramCrackers.Utilities.List

{-| Data declaration of record type for programme options -}
data Args = Profile {  wordC     :: Bool
                     , ttr       :: Bool
                     , sentC     :: Bool
                     , sentStats :: Bool
                     , input     :: FilePath
                     , output    :: FilePath
                    } 
            |<commit_msg>Restructure and clean  import statement<commit_after>{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards #-}

module NGramCrackers.Parsers.Args
( optionHandler
, myModes
, exec
) where

import System.Console.CmdArgs
import System.Exit
import Control.Monad (unless, when)

import qualified System.IO    as SIO
import qualified Data.Text.IO as TIO
import qualified Data.Text    as T
import qualified Data.List    as DL (map, concat, concatMap)

import NGramCrackers.DataTypes
import NGramCrackers.Ops.Infixes
import NGramCrackers.Ops.NG
import NGramCrackers.Ops.Pretty
import NGramCrackers.Parsers.Paragraph
import NGramCrackers.Quant.Counts
import NGramCrackers.Quant.Stats
import NGramCrackers.Utilities.List
import NGramCrackers.Utilities.Tuple

{-| Data declaration of record type for programme options -}
data Args = Profile {  wordC     :: Bool
                     , ttr       :: Bool
                     , sentC     :: Bool
                     , sentStats :: Bool
                     , input     :: FilePath
                     , output    :: FilePath
                    } 
            |
{'fraction_non_alphanumeric': 0.06824264049955397, 'fraction_numerical': 0.0, 'mean_word_length': 2.5659777424483305, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '344410', 'n_tokens_mistral': 688, 'n_tokens_neox': 644, 'n_words': 172}