<commit_before>
(use-modules (ice-9 receive))  ; for receive, below
(use-modules (srfi srfi-1)
             (opencog)
             (opencog nlp)  ; need the atom types
             (opencog nlp relex2logic) ; helpers.scm uses this
             (opencog nlp sureal))

;
; loading additional dependency
(load "sentence-forms.scm")
(load "helpers.scm")
(load "anaphora-noun-item.scm")
(load "anaphora-nouns-list.scm")
(load "anaphora.scm")
(load "chunks-option.scm")
(load "chunks-set.scm")
(load "atomW.scm")


; =======================================================================
; Main interface
; =======================================================================

; -----------------------------------------------------------------------
; See documentation below ...
(define-public microplanning
"
  microplanning -- The main microplanning interface

  A shortcut for calling microplanning without specifying all the
  arguments.
"
	(case-lambda
		((sl ut) (microplanning-main sl ut *default_chunks_option* #t))
		((sl ut opt a) (microplanning-main sl ut opt a))
	)
)


; =======================================================================
; Some constants
; =======================================================================

; TODO: Describe what these variables are for.
(define *microplanning_not_sayable* 0)
(define *microplanning_sayable* 1)
(define *microplanning_too_long* 2)
(define *default_chunks_option*
	(make <chunks-option>
		#:main-weight-proc (lambda (t f l) (* (+ t l) f))
		#:supp-weight-proc (lambda (t f l) (* (+ t l) (- 2 f)))
		#:form-limit 3
	)
)

(export *default_chunks_option*)

; =======================================================================<commit_msg>Revert an earlier change<commit_after>
(use-modules (ice-9 receive))  ; for receive, below
(use-modules (ice-9 optargs))  ; for define*-public
(use-modules (srfi srfi-1)
             (opencog)
             (opencog nlp)  ; need the atom types
             (opencog nlp relex2logic) ; helpers.scm uses this
             (opencog nlp sureal))

;
; loading additional dependency
(load "sentence-forms.scm")
(load "helpers.scm")
(load "anaphora-noun-item.scm")
(load "anaphora-nouns-list.scm")
(load "anaphora.scm")
(load "chunks-option.scm")
(load "chunks-set.scm")
(load "atomW.scm")


; =======================================================================
; Main interface
; =======================================================================

; -----------------------------------------------------------------------
; Because we use the case-lambda, here, instead of optargs,
; we cannot use define*-public, like we would like to. So the
; export is down below.  Oh well.
(define microplanning
	(case-lambda
		((sl ut) (microplanning-main sl ut *default_chunks_option* #t))
		((sl ut opt a) (microplanning-main sl ut opt a))
	)
)

(export microplanning)


(set-procedure-property! microplanning 'documentation
"
  microplanning -- The main microplanning interface

  A shortcut for calling microplanning without specifying all the
  arguments.
")

; =======================================================================
; Some constants
; =======================================================================

; TODO: Describe what these variables are for.
(define *microplanning_not_sayable* 0)
(define *microplanning_sayable* 1)
(define *microplanning_too_long* 2)
(define *default_chunks_option*
	(make <chunks-option>
		#:main-weight-proc (lambda (t f l) (* (+ t l) f))
		#:supp-weight-proc (lambda (t f l) (* (+ t l) (- 2 f)))
		#:form-limit 3
	)
)

(export *default_chunks_option*)

; =======================================================================
{'fraction_non_alphanumeric': 0.33505154639175255, 'fraction_numerical': 0.004612045577862181, 'mean_word_length': 3.8834437086092715, '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': '5696660', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1046, 'n_words': 291}