<commit_before>;;
;; Configuration file for the example crisp rule base system (used by
;; fc-deduction.scm)
;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Load required modules and utils ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(use-modules (opencog))
(use-modules (opencog rule-engine))

;; Useful to run the unit tests without having to install opencog
(load-from-path "rule-engine-utils.scm")

;;;;;;;;;;;;;;;;
;; Load rules ;;
;;;;;;;;;;;;;;;;
(load-from-path "tests/rule-engine/rules/fc-deduction-rule.scm")

;; Define a new rule base (aka rule-based system)
(define fc-deduction-rbs (ConceptNode "fc-deduction-rule-base"))
(InheritanceLink
   fc-deduction-rbs
   (ConceptNode "URE")
)

;; Associate the rules to the rule base (with weights, their semantics
;; is currently undefined, we might settled with probabilities but it's
;; not sure)
(ure-add-rules fc-deduction-rbs (list fc-deduction-rule-name))

;; Termination criteria parameters
(ure-set-num-parameter fc-deduction-rbs "URE:maximum-iterations" 20)

;; Attention allocation (set the TV strength to 0 to disable it, 1 to
;; enable it)
(ure-set-fuzzy-bool-parameter fc-deduction-rbs "URE:attention-allocation" 0)
<commit_msg>Add relative to project load path to rule-engine-utils.scm in fc-deduction-config.scm<commit_after>;;
;; Configuration file for the example crisp rule base system (used by
;; fc-deduction.scm)
;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Load required modules and utils ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(use-modules (opencog))
(use-modules (opencog rule-engine))

;; Useful to run the unit tests without having to install opencog
(load-from-path "opencog/scm/opencog/rule-engine/rule-engine-utils.scm")

;;;;;;;;;;;;;;;;
;; Load rules ;;
;;;;;;;;;;;;;;;;
(load-from-path "tests/rule-engine/rules/fc-deduction-rule.scm")

;; Define a new rule base (aka rule-based system)
(define fc-deduction-rbs (ConceptNode "fc-deduction-rule-base"))
(InheritanceLink
   fc-deduction-rbs
   (ConceptNode "URE")
)

;; Associate the rules to the rule base (with weights, their semantics
;; is currently undefined, we might settled with probabilities but it's
;; not sure)
(ure-add-rules fc-deduction-rbs (list fc-deduction-rule-name))

;; Termination criteria parameters
(ure-set-num-parameter fc-deduction-rbs "URE:maximum-iterations" 20)

;; Attention allocation (set the TV strength to 0 to disable it, 1 to
;; enable it)
(ure-set-fuzzy-bool-parameter fc-deduction-rbs "URE:attention-allocation" 0)

{'fraction_non_alphanumeric': 0.19927536231884058, 'fraction_numerical': 0.004025764895330112, 'mean_word_length': 5.197007481296758, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4822086', 'n_tokens_mistral': 897, 'n_tokens_neox': 810, 'n_words': 227}