<commit_before>﻿// Colorado (c) 2015-2018 Baltasar MIT License <<EMAIL>>

namespace Colorado.Gui {
    using System;
    using GtkUtil;

    public partial class DlgImport {
        public Core.ImportOptions Options {
            get {
                return new Core.ImportOptions( this.FileName ) {
                    ImportId = this.cmbType.ActiveText,
                    FirstRowIsForHeaders = this.FirstRowForHeaders,
                };
            }
        }

        public string FileName {
            get { return this.edFileName.Text; }
        }

        public char Delimiter {
            get {
                string delimiter = this.cmbDelimiter.Entry.Text.Trim();
                char toret = delimiter[ 0 ];

                if ( delimiter.Length == 1 ) {
                    toret = Core.Delimiter.TabDelimiter;
                }

                return toret;
            }
        }

        public bool FirstRowForHeaders {
            get { return this.cbFirstRowForHeaders.Active; }
        }

        void OnOpen()
        {
            if ( string.IsNullOrWhiteSpace( lastFileName) ) {
                lastFileName = ".";
            }

            var importer = Core.Importer.GetImporter( this.cmbType.ActiveText );


            if ( Util.DlgOpen(
                Core.AppInfo.Name, "Open",
                (Gtk.Window) this.Parent,
                ref lastFileName,
                importer.FileExtension ) )
            {
                this.edFileName.Text = lastFileName;
            }
            else lastFileName = this.edFileName.Text;
        }

        public static string lastFileName;
    }
}
<commit_msg>Small bugfix: filter in importer<commit_after>﻿// Colorado (c) 2015-2018 Baltasar MIT License <<EMAIL>>

namespace Colorado.Gui {
    using System;
    using GtkUtil;

    public partial class DlgImport {
        public Core.ImportOptions Options {
            get {
                return new Core.ImportOptions( this.FileName ) {
                    ImportId = this.cmbType.ActiveText,
                    FirstRowIsForHeaders = this.FirstRowForHeaders,
                };
            }
        }

        public string FileName {
            get { return this.edFileName.Text; }
        }

        public char Delimiter {
            get {
                string delimiter = this.cmbDelimiter.Entry.Text.Trim();
                char toret = delimiter[ 0 ];

                if ( delimiter.Length == 1 ) {
                    toret = Core.Delimiter.TabDelimiter;
                }

                return toret;
            }
        }

        public bool FirstRowForHeaders {
            get { return this.cbFirstRowForHeaders.Active; }
        }

        void OnOpen()
        {
            if ( string.IsNullOrWhiteSpace( lastFileName) ) {
                lastFileName = ".";
            }

            var importer = Core.Importer.GetImporter( this.cmbType.ActiveText );


            if ( Util.DlgOpen(
                Core.AppInfo.Name, "Open",
                (Gtk.Window) this.Parent,
                ref lastFileName,
                "*." + importer.FileExtension ) )
            {
                this.edFileName.Text = lastFileName;
            }
            else lastFileName = this.edFileName.Text;
        }

        public static string lastFileName;
    }
}

{'fraction_non_alphanumeric': 0.08233173076923077, 'fraction_numerical': 0.006009615384615385, 'mean_word_length': 1.286401098901099, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1163434', 'n_tokens_mistral': 899, 'n_tokens_neox': 837, 'n_words': 180}