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:- ensure_loaded(baseKB:library('logicmoo/common_logic/common_logic_sumo.pfc')).   17
   18%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   19% SETUP SUMO KB EXTENSIONS
   20%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   21
   22:- set_prolog_flag(do_renames,term_expansion).   23
   24:- during_boot(set_prolog_flag(do_renames,restore)).   25
   26sumo_ain2(documentation(_, xtChineseLanguage,_)).
   27sumo_ain2(CycLOut):-
   28    delay_rule_eval(CycLOut,sumo_rule,NewAsserts),
   29    dmsg(NewAsserts),
   30    ain(NewAsserts).
   31
   32loadSumo(File):- \+ exists_file(File),!,wdmsg(no_such_file(File)),!.
   33loadSumo(File):- with_lisp_translation_cached(File,sumo_to_pdkb,nop).
   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:- after_boot(loadSumo1).   66
   67:- after_boot(loadSumo2).   68
   69:- after_boot(loadSumo3).   70
   71
   72:- fixup_exports.