<commit_before>(use-modules (opencog) (opencog rule-engine))

; NOTE: Temporary Hack around cogservers scheme module loading issue
; See https://github.com/opencog/atomspace/issues/508 for details
; XXX Except this "hack" utterly, completel broken: since it causes
; everything to be defined in the rule-egine module, and thus everything
; become invisble outside the rule-engine module!!
; (load-from-path "opencog/rule-engine.scm")

; Load rule files. The order of the load matters
(load "../rule-utils.scm")
(load "load-rules.scm")

; Define r2l-rulebase for English.
(define-public r2l-rules (ConceptNode "R2L-en-RuleBase"))
(ure-define-rbs r2l-rules 100)

; Add rules to rulebase
; NOTE: The weight is chosen to be equal for all rules as the mode ure is
; being run in doesn't require it.

(ure-define-add-rule r2l-rules "advmod" advmod 1)
(ure-define-add-rule r2l-rules "advmod-maybe" advmod-maybe 1)

(ure-define-add-rule r2l-rules "adverbialpp" adverbialpp 1)

(ure-define-add-rule r2l-rules "amod" amod 1)

(ure-define-add-rule r2l-rules "atTime" atTime 1)

(ure-define-add-rule r2l-rules "because" because 1)

(ure-define-add-rule r2l-rules "be-inheritance" be-inheritance 1)

(ure-define-add-rule r2l-rules "compmod" compmod 1)

(ure-define-add-rule r2l-rules "comp" comp 1)

(ure-define-add-rule r2l-rules "copula-ynq" copula-ynq 1)

(ure-define-add-rule r2l-rules "definite" definite 1)

;(ure-define-add-rule r2l-rules "demdet" demdet 1)

(ure-define-add-rule r2l-rules "howdeg-q" howdeg-q 1)

(ure-define-add-rule r2l-rules "howpredadj1-q" howpredadj1-q 1)

(ure-define-add-rule r2l-rules "how-q" how-q 1)

(ure-define-add-rule r2l-rules "howquant-q" howquant-q 1)

;(ure-define-add-rule r2l-rules "IMPERATIVE" IMPERATIVE 1)

(ure-define-add-rule r2l-rules "neg" neg 1)

(ure-define-add-rule r2l-rules "poss" poss 1)

;(ure-define-add-rule r2l-rules "post-processing" post-processing 1)

(ure-define-add-rule r2l-rules "pp" pp 1)

(ure-define-add-rule r2l-rules "pred-ynq" pred-ynq 1)

;(ure-define-add-rule r2l-rules "prepadj" prepadj 1)

(ure-define-add-rule r2l-rules "PREP" PREP 1)

(ure-define-add-rule r2l-rules "quantity" quantity 1)

(ure-define-add-rule r2l-rules "rel" rel 1)

(ure-define-add-rule r2l-rules "rep" rep 1)

;(ure-define-add-rule r2l-rules "rule-helpers" rule-helpers 1)

(ure-define-add-rule r2l-rules "SP" SP 1)

(ure-define-add-rule r2l-rules "SVIO1" SVIO1 1)

(ure-define-add-rule r2l-rules "SVIO2" SVIO2 1)

(ure-define-add-rule r2l-rules "svo" svo 1)

(ure-define-add-rule r2l-rules "SV" SV 1)

(ure-define-add-rule r2l-rules "TOBE" TOBE 1)

(ure-define-add-rule r2l-rules "todo1" todo1 1)

(ure-define-add-rule r2l-rules "todo2" todo2 1)

(ure-define-add-rule r2l-rules "todo5" todo5 1)

(ure-define-add-rule r2l-rules "todo3" todo3 1)

;(ure-define-add-rule r2l-rules "utilities" utilities 1)

(ure-define-add-rule r2l-rules "when-cop-q" when-cop-q 1)

(ure-define-add-rule r2l-rules "when-q" when-q 1)

(ure-define-add-rule r2l-rules "where-cop-q" where-cop-q 1)

(ure-define-add-rule r2l-rules "where-q" where-q 1)

(ure-define-add-rule r2l-rules "whichiobjQ" whichiobjQ 1)

(ure-define-add-rule r2l-rules "whichobjQ" whichobjQ 1)

;(ure-define-add-rule r2l-rules "whichobjSVIOQ" whichobjSVIOQ 1)

;(ure-define-add-rule r2l-rules "whichpobjQ" whichpobjQ 1)

(ure-define-add-rule r2l-rules "whichpredadjQ" whichpredadjQ 1)

;(ure-define-add-rule r2l-rules "whichsubjpobjQ" whichsubjpobjQ 1)

;(ure-define-add-rule r2l-rules "whichsubjQ" whichsubjQ 1)

;(ure-define-add-rule r2l-rules "whichsubjSVIOQ" whichsubjSVIOQ 1)

(ure-define-add-rule r2l-rules "whichsubjSVOQ" whichsubjSVOQ 1)

;(ure-define-add-rule r2l-rules "whichsubjSVQ" whichsubjSVQ 1)

(ure-define-add-rule r2l-rules "why-cop-q" why-cop-q 1)

(ure-define-add-rule r2l-rules "why-q" why-q 1)

(ure-define-add-rule r2l-rules "declarative" declarative 1)

(ure-define-add-rule r2l-rules "truthquery" truthquery 1)

(ure-define-add-rule r2l-rules "interrogative" interrogative 1)

(ure-define-add-rule r2l-rules "imperative" imperative 1)

(ure-define-add-rule r2l-rules "det" det 1)

(ure-define-add-rule r2l-rules "nn" nn 1)

(ure-define-add-rule r2l-rules "gender" gender 1)

(ure-define-add-rule r2l-rules "conj" conj 1)

(ure-define-add-rule r2l-rules "tense" tense 1)

(ure-define-add-rule r2l-rules "passive" passive 1)<commit_msg>Update relex2logic rulebase definition<commit_after>(use-modules (opencog) (opencog rule-engine))

; NOTE: Temporary Hack around cogservers scheme module loading issue
; See https://github.com/opencog/atomspace/issues/508 for details
; XXX Except this "hack" utterly, completel broken: since it causes
; everything to be defined in the rule-egine module, and thus everything
; become invisble outside the rule-engine module!!
; (load-from-path "opencog/rule-engine.scm")

; Load rule files. The order of the load matters
(load "../rule-utils.scm")
(load "load-rules.scm")

; Define r2l-rulebase for English.
(define-public r2l-rules (ConceptNode "R2L-en-RuleBase"))
(ure-define-rbs r2l-rules 100)

; Add rules to rulebase
; NOTE: The weight is chosen to be equal for all rules as the mode ure is
; being run in doesn't require it.

(ure-define-add-rule r2l-rules "advmod" advmod (stv 1 1))
(ure-define-add-rule r2l-rules "advmod-maybe" advmod-maybe (stv 1 1))

(ure-define-add-rule r2l-rules "adverbialpp" adverbialpp (stv 1 1))

(ure-define-add-rule r2l-rules "amod" amod (stv 1 1))

(ure-define-add-rule r2l-rules "atTime" atTime (stv 1 1))

(ure-define-add-rule r2l-rules "because" because (stv 1 1))

(ure-define-add-rule r2l-rules "be-inheritance" be-inheritance (stv 1 1))

(ure-define-add-rule r2l-rules "compmod" compmod (stv 1 1))

(ure-define-add-rule r2l-rules "comp" comp (stv 1 1))

(ure-define-add-rule r2l-rules "copula-ynq" copula-ynq (stv 1 1))

(ure-define-add-rule r2l-rules "definite" definite (stv 1 1))

;(ure-define-add-rule r2l-rules "demdet" demdet (stv 1 1))

(ure-define-add-rule r2l-rules "howdeg-q" howdeg-q (stv 1 1))

(ure-define-add-rule r2l-rules "howpredadj1-q" howpredadj1-q (stv 1 1))

(ure-define-add-rule r2l-rules "how-q" how-q (stv 1 1))

(ure-define-add-rule r2l-rules "howquant-q" howquant-q (stv 1 1))

;(ure-define-add-rule r2l-rules "IMPERATIVE" IMPERATIVE (stv 1 1))

(ure-define-add-rule r2l-rules "neg" neg (stv 1 1))

(ure-define-add-rule r2l-rules "poss" poss (stv 1 1))

;(ure-define-add-rule r2l-rules "post-processing" post-processing (stv 1 1))

(ure-define-add-rule r2l-rules "pp" pp (stv 1 1))

(ure-define-add-rule r2l-rules "pred-ynq" pred-ynq (stv 1 1))

;(ure-define-add-rule r2l-rules "prepadj" prepadj (stv 1 1))

(ure-define-add-rule r2l-rules "PREP" PREP (stv 1 1))

(ure-define-add-rule r2l-rules "quantity" quantity (stv 1 1))

(ure-define-add-rule r2l-rules "rel" rel (stv 1 1))

(ure-define-add-rule r2l-rules "rep" rep (stv 1 1))

;(ure-define-add-rule r2l-rules "rule-helpers" rule-helpers (stv 1 1))

(ure-define-add-rule r2l-rules "SP" SP (stv 1 1))

(ure-define-add-rule r2l-rules "SVIO1" SVIO1 (stv 1 1))

(ure-define-add-rule r2l-rules "SVIO2" SVIO2 (stv 1 1))

(ure-define-add-rule r2l-rules "svo" svo (stv 1 1))

(ure-define-add-rule r2l-rules "SV" SV (stv 1 1))

(ure-define-add-rule r2l-rules "TOBE" TOBE (stv 1 1))

(ure-define-add-rule r2l-rules "todo1" todo1 (stv 1 1))

(ure-define-add-rule r2l-rules "todo2" todo2 (stv 1 1))

(ure-define-add-rule r2l-rules "todo5" todo5 (stv 1 1))

(ure-define-add-rule r2l-rules "todo3" todo3 (stv 1 1))

;(ure-define-add-rule r2l-rules "utilities" utilities (stv 1 1))

(ure-define-add-rule r2l-rules "when-cop-q" when-cop-q (stv 1 1))

(ure-define-add-rule r2l-rules "when-q" when-q (stv 1 1))

(ure-define-add-rule r2l-rules "where-cop-q" where-cop-q (stv 1 1))

(ure-define-add-rule r2l-rules "where-q" where-q (stv 1 1))

(ure-define-add-rule r2l-rules "whichiobjQ" whichiobjQ (stv 1 1))

(ure-define-add-rule r2l-rules "whichobjQ" whichobjQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichobjSVIOQ" whichobjSVIOQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichpobjQ" whichpobjQ (stv 1 1))

(ure-define-add-rule r2l-rules "whichpredadjQ" whichpredadjQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichsubjpobjQ" whichsubjpobjQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichsubjQ" whichsubjQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichsubjSVIOQ" whichsubjSVIOQ (stv 1 1))

(ure-define-add-rule r2l-rules "whichsubjSVOQ" whichsubjSVOQ (stv 1 1))

;(ure-define-add-rule r2l-rules "whichsubjSVQ" whichsubjSVQ (stv 1 1))

(ure-define-add-rule r2l-rules "why-cop-q" why-cop-q (stv 1 1))

(ure-define-add-rule r2l-rules "why-q" why-q (stv 1 1))

(ure-define-add-rule r2l-rules "declarative" declarative (stv 1 1))

(ure-define-add-rule r2l-rules "truthquery" truthquery (stv 1 1))

(ure-define-add-rule r2l-rules "interrogative" interrogative (stv 1 1))

(ure-define-add-rule r2l-rules "imperative" imperative (stv 1 1))

(ure-define-add-rule r2l-rules "det" det (stv 1 1))

(ure-define-add-rule r2l-rules "nn" nn (stv 1 1))

(ure-define-add-rule r2l-rules "gender" gender (stv 1 1))

(ure-define-add-rule r2l-rules "conj" conj (stv 1 1))

(ure-define-add-rule r2l-rules "tense" tense (stv 1 1))

(ure-define-add-rule r2l-rules "passive" passive (stv 1 1))
{'fraction_non_alphanumeric': 0.15592853275582025, 'fraction_numerical': 0.0404981050351922, 'mean_word_length': 4.142538975501114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6739385', 'n_tokens_mistral': 4222, 'n_tokens_neox': 3998, 'n_words': 974}