<commit_before>module GroupDoc exposing (..)

import Data.DeviceId exposing (DeviceId)
import Document exposing (..)
import Json.Decode as D exposing (Decoder)
import Json.Decode.Pipeline as D
import Json.Encode as E
import List.Extra
import Random.Pcg
import Store exposing (..)
import Time exposing (Time)
import Tuple2
import X.Function exposing (..)
import X.Function.Infix exposing (..)
import X.Predicate
import X.Record


type GroupDocType
    = ContextGroupDocType
    | ProjectGroupDocType


type GroupDocId
    = GroupDocId GroupDocType DocId


contextIdFromDocId =
    GroupDocId ContextGroupDocType


projectIdFromDocId =
    GroupDocId ProjectGroupDocType


contextIdFromDoc =
    Document.getId >> contextIdFromDocId


idFromDoc gdType gdDoc =
    GroupDocId gdType (Document.getId gdDoc)


createId gdType gdDocId =
    GroupDocId gdType gdDocId


toComparable =
    toString >> Debug.log "toString"


projectIdFromDoc =
    Document.getId >> projectIdFromDocId


type GroupDocAction
    = GDA_StartAdding


type GroupDocIdAction
    = GDA_StartEditing
    | GDA_ToggleArchived
    | GDA_ToggleDeleted
    | GDA_UpdateFormName GroupDocForm GroupDocName
    | GDA_SaveForm GroupDocForm


type alias GroupDocForm =
    { id : DocId
    , groupDocType : GroupDocType
    , groupDocId : GroupDocId
    , name : GroupDocName
    , isArchived : Bool
    , mode : GroupDocFormMode
    }


type GroupDocFormMode<commit_msg>WIP: cleanup filter and tree then remove namedFilter<commit_after>module GroupDoc exposing (..)

import Data.DeviceId exposing (DeviceId)
import Document exposing (..)
import Json.Decode as D exposing (Decoder)
import Json.Decode.Pipeline as D
import Json.Encode as E
import List.Extra
import Random.Pcg
import Store exposing (..)
import Time exposing (Time)
import Tuple2
import X.Function exposing (..)
import X.Function.Infix exposing (..)
import X.Predicate
import X.Record


type GroupDocType
    = ContextGroupDocType
    | ProjectGroupDocType


type GroupDocId
    = GroupDocId GroupDocType DocId


contextIdFromDocId =
    GroupDocId ContextGroupDocType


projectIdFromDocId =
    GroupDocId ProjectGroupDocType


contextIdFromDoc =
    Document.getId >> contextIdFromDocId


idFromDoc gdType gdDoc =
    GroupDocId gdType (Document.getId gdDoc)


createId gdType gdDocId =
    GroupDocId gdType gdDocId


toComparable =
    toString


projectIdFromDoc =
    Document.getId >> projectIdFromDocId


type GroupDocAction
    = GDA_StartAdding


type GroupDocIdAction
    = GDA_StartEditing
    | GDA_ToggleArchived
    | GDA_ToggleDeleted
    | GDA_UpdateFormName GroupDocForm GroupDocName
    | GDA_SaveForm GroupDocForm


type alias GroupDocForm =
    { id : DocId
    , groupDocType : GroupDocType
    , groupDocId : GroupDocId
    , name : GroupDocName
    , isArchived : Bool
    , mode : GroupDocFormMode
    }


type GroupDocFormMode
{'fraction_non_alphanumeric': 0.057739130434782605, 'fraction_numerical': 0.0006956521739130435, 'mean_word_length': 3.809364548494983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5408185', 'n_tokens_mistral': 932, 'n_tokens_neox': 893, 'n_words': 234}