<commit_before>;; Copyright (c) <NAME>. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.

(ns #^{:doc "Provides information on all tasks planned for conexp-clj."}
  conexp.contrib.todo
  (:use clojure.contrib.def)
  (:use [clojure.contrib.string :only (split)])
  (:use [clojure.contrib.pprint :only (pprint)]))

;;;

(defvar- *conexp-todo-list*
  { "conexp" { "layout" { "util"     [ "Implement function for inf-irr-addivite layout." ],
			  "force"    [ "Implement force layout as described by C. Zschalig." ],
			  "zschalig" [ "Implement initial positioning and force distribution layout as described by C. Zschalig."] },

	       "fca"    { "rules"    [ "Think about and write some code." ],
			  "association-rules" [ "More?" ],
			  "exploration" [ "Add background knowledge (implications or clauses)." ],
			  "contexts" [ "Better implementation for context-for-clop." ] },

	       "graphics" { "draw"   [ "Implement full lattice editor" ],
			    "base"   [ "Get current lattice layout from a GScene." ] },

	       "gui"    { "plugins"  { "contexteditor" [ "Design and implement." ],
				       "latticeeditor" [ "Design and implement." ],
				       "codeeditor"    [ "Design and implement." ],
				       "browser"       [ "Design and implement graphical plugin browser." ] } },

	       "contrib" { "fuzzy"   [ "Design and implement something for FuzzyFCA (Cynthia)." ],
			   "rough"   [ "Design and implement something for RoughSets (Christian)." ],
			   "algorithms" { "bitwise" [ "Add In-Close and fast Calculations for Luxenburger Bases.",
						      "Add preconditioned NextClosure." ],
					  "parallel" [ "Implement ParallelNextClosure and Krajca-Outrata-Vychodil." ] } },

	       "tests"  ["Add tests for everything.",
			 { "util"     [ "Add more tests." ],
			   "base"     [ "Check whether everything has been tested." ],
			   "fca"      { "contexts" [ "Finish tests." ],
					"implications" [ "Finish tests." ] }, } ] },
    "doc"    [ "Add docstrings for namespaces.",
	       "Add docstrings for all functions.",
	       "Extend LaTeX-Documentation." ] })

(defn- access-todo-list
  "Returns all tasks remaining for given ns, given as sequence of strings."
  [ns-as-seq]
  (if (empty? ns-as-seq)
    *conexp-todo-list*
    (let [runner (fn runner [todo-list keys]
		   (cond
		     (or (not todo-list)
			 (empty? keys))
		     todo-list,
		     (vector? todo-list)
		     (assoc todo-list
		       (dec (count todo-list))
		       {(first keys) (runner ((last todo-list)
					      (first keys))
					     (rest keys))}),
		     (map? todo-list)
		     {(first keys) (runner (todo-list (first keys))
					   (rest keys))}))]
      (runner *conexp-todo-list* ns-as-seq))))

(defn- format-output
  "Formats structure given as human-readable output.

  This implementation is ugly."<commit_msg>Updated conexp.contrib.todo<commit_after>;; Copyright (c) <NAME>. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.

(ns
    #^{:doc "Provides information on all tasks planned for conexp-clj."}
  conexp.contrib.todo
  (:use clojure.contrib.def)
  (:use [clojure.contrib.string :only (split)])
  (:use [clojure.contrib.pprint :only (pprint)]))

;;;

(defvar- *conexp-todo-list*
  { "conexp" { "layout" { "force"    [ "Implement force layout with derivations?" ],
			  "zschalig" [ "Implement initial positioning as described by C. Zschalig."] },
	       "fca"    { "rules"    [ "Think about and write some code." ],
			  "association-rules" [ "More?" ],
			  "exploration" [ "Add background knowledge (implications or clauses)." ],
			  "contexts" [ "Better implementation for context-for-clop." ] },
	       "gui"    { "plugins"  { "contexteditor" [ "Design and implement." ],
				       "latticeeditor" [ "Design and implement." ],
				       "codeeditor"    [ "Design and implement." ],
				       "browser"       [ "Design and implement graphical plugin browser." ] } },
	       "contrib" { "fuzzy"   [ "Design and implement something for FuzzyFCA (Cynthia)." ],
			   "rough"   [ "Design and implement something for RoughSets (Christian)." ],
			   "algorithms" { "concepts"
					  [ "Check In-Close and add fast Calculations for Luxenburger Bases.",
					    "Add preconditioned NextClosure.",
					    "Implement ParallelNextClosure and Krajca-Outrata-Vychodil." ] } },
	       "tests"  ["Add tests for everything.",
			 { "fca"  { "contexts" [ "Finish tests." ],
				    "implications" [ "Finish tests." ] } } ] },
    "doc"    [ "Add docstrings for namespaces.",
	       "Add docstrings for all functions.",
	       "Extend LaTeX-Documentation." ] })

(defn- access-todo-list
  "Returns all tasks remaining for given ns, given as sequence of strings."
  [ns-as-seq]
  (if (empty? ns-as-seq)
    *conexp-todo-list*
    (let [runner (fn runner [todo-list keys]
		   (cond
		     (or (not todo-list)
			 (empty? keys))
		     todo-list,
		     (vector? todo-list)
		     (assoc todo-list
		       (dec (count todo-list))
		       {(first keys) (runner ((last todo-list)
					      (first keys))
					     (rest keys))}),
		     (map? todo-list)
		     {(first keys) (runner (todo-list (first keys))
					   (rest keys))}))]
      (runner *conexp-todo-list* ns-as-seq))))

(defn- format-output
  "Formats structure given as human-readable output.

  This implementation is ugly."
{'fraction_non_alphanumeric': 0.13964633944802513, 'fraction_numerical': 0.0013220955214014213, 'mean_word_length': 2.7590062111801243, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3598488', 'n_tokens_mistral': 2081, 'n_tokens_neox': 1829, 'n_words': 606}