add prolog file
This commit is contained in:
parent
593fb634a4
commit
c7b9d504bf
10
Logic/TrashRecognition/TrashProlog.py
Normal file
10
Logic/TrashRecognition/TrashProlog.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from pyswip import Prolog
|
||||||
|
|
||||||
|
def get_trash(day: str):
|
||||||
|
prolog = Prolog()
|
||||||
|
from os import sep # os invariant separator
|
||||||
|
prolog.consult(f"Logic{sep}TrashRecognition{sep}TrashKnowledge.pl")
|
||||||
|
print(list(prolog.query("collect_trash(X)")))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
get_trash("monday")
|
Loading…
Reference in New Issue
Block a user