Skip to content

Commit

Permalink
text_to_fillin_string
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Feb 15, 2022
1 parent c0c6ada commit 783640c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion prolog/chat_ensemble/bot_fillin.pl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
tokenize_fillin_string([Str|Text],AtomO):- atomic(Str), is_list(Text), !, text_to_fillin_string([Str|Text],AtomO).
tokenize_fillin_string(Atom,AtomO):- atom(Atom),!,Atom=AtomO.
tokenize_fillin_string(JSON,AtomO):- compound(JSON),!,any_to_json_dict(JSON,Dict),atom_json_dict(AtomO,Dict,[]).
tokenize_fillin_string(Text,AtomO):- tokenize_fillin_string(Text,AtomO).
tokenize_fillin_string(Text,AtomO):- text_to_fillin_string(Text,AtomO).
text_to_fillin_string(Text,StrO):- any_to_string(Text,Str), replace_in_string('\n',' ',Str,StrO).
/*
tokenize_fillin_string(Text,StrO):- any_to_string(Text,Str), replace_in_string(['\\'='\\\\','\''='\\\''],Str,StrM),
Expand Down Expand Up @@ -303,3 +303,4 @@
:- add_history(test_fillin).
:- fixup_exports.


2 changes: 1 addition & 1 deletion prolog/chat_ensemble/bot_neox.pl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
tokenize_neox_string([Str|Text],AtomO):- atomic(Str), is_list(Text), !, text_to_neox_string([Str|Text],AtomO).
tokenize_neox_string(Atom,AtomO):- atom(Atom),!,Atom=AtomO.
tokenize_neox_string(JSON,AtomO):- compound(JSON),!,any_to_json_dict(JSON,Dict),atom_json_dict(AtomO,Dict,[]).
tokenize_neox_string(Text,AtomO):- tokenize_neox_string(Text,AtomO).
tokenize_neox_string(Text,AtomO):- text_to_neox_string(Text,AtomO).
text_to_neox_string(Text,StrO):- any_to_string(Text,Str), replace_in_string('\n',' ',Str,StrO).
/*
tokenize_neox_string(Text,StrO):- any_to_string(Text,Str), replace_in_string(['\\'='\\\\','\''='\\\''],Str,StrM),
Expand Down

0 comments on commit 783640c

Please sign in to comment.