1:- module(logicmoo_sumo,[]).

logicmoo_sumo - special module hooks into the logicmoo engine allow

SUMO to be recocogized via our CycL/KIF handlers

Logicmoo Project: A LarKC Server written in Prolog Maintainer: Douglas Miles Dec 13, 2035

?- ensure_loaded(library(logicmoo_sumo)).

*/

   14:- ensure_loaded(library(logicmoo_clif)).   15
   16:- baseKB:ensure_loaded(library('logicmoo/common_logic/common_logic_sumo.pfc')).   17
   18% SETUP SUMO KB EXTENSIONS
   19%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   20
   21:- set_prolog_flag(do_renames,term_expansion).   22
   23:- during_boot(set_prolog_flag(do_renames,restore)).   24
   25sumo_ain2(documentation(_, xtChineseLanguage,_)).
   26sumo_ain2(CycLOut):-
   27    delay_rule_eval(CycLOut,sumo_rule,NewAsserts),
   28    dmsg(NewAsserts),
   29    ain(NewAsserts).
   30
   31loadSumo(File):- \+ exists_file(File),!,wdmsg(no_such_file(File)),!.
   32loadSumo(File):- with_lisp_translation_cached(File,sumo_to_pdkb,nop).
   33
   34
   35skip_sumo:- app_argv('--nosumo'),!.
   36skip_sumo:- app_argv(List), \+ member('--sumo',List), \+ member('--snark',List), \+ member('--all',List),!.
   37
   38clone_ontologyportal_sumo:- skip_sumo,!.
   39clone_ontologyportal_sumo:- exists_directory('./ontologyportal_sumo'),!.
   40clone_ontologyportal_sumo:- shell('git clone https://github.com/ontologyportal/sumo.git ./ontologyportal_sumo'),shell('touch _*.tmp').
   41
   42:- during_boot(clone_ontologyportal_sumo).   43
   44loadSumo1:- skip_sumo,!.
   45loadSumo1:- 
   46   loadSumo('./ontologyportal_sumo/Merge.kif'),
   47   loadSumo('./ontologyportal_sumo/Mid-level-ontology.kif'),
   48   !.
   49
   50loadSumo2:- skip_sumo,!.
   51loadSumo2:- 
   52   loadSumo('./ontologyportal_sumo/Translations/relations-en.txt'),
   53   loadSumo('./ontologyportal_sumo/english_format.kif'),
   54   loadSumo('./ontologyportal_sumo/domainEnglishFormat.kif'),
   55   !.
   56
   57loadSumo3:- skip_sumo,!.
   58loadSumo3:- 
   59   ensure_loaded(baseKB:library('logicmoo/common_logic/common_logic_sumo.pfc')),
   60   !.
   61
   62%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   63% SAVE SUMO KB EXTENSIONS
   64%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   65%:- during_boot(loadSumo1).
   66
   67%:- during_boot(loadSumo2).
   68
   69%:- during_boot(loadSumo3).
   70
   71:- fixup_exports.