Главная страница
Навигация по странице:

  • 230 Приложение Б Файл job.clp

  • 237 Файл index.php

  • кр. Ю. Ю. Громов, О. Г. Иванова, В. В. Алексеев, М. П. Беляев, Д. П. Швец, аи. Елисеев интеллектуальные информационные системы и технологии


    Скачать 2.03 Mb.
    НазваниеЮ. Ю. Громов, О. Г. Иванова, В. В. Алексеев, М. П. Беляев, Д. П. Швец, аи. Елисеев интеллектуальные информационные системы и технологии
    Дата17.02.2023
    Размер2.03 Mb.
    Формат файлаpdf
    Имя файлаgromov2-a.pdf
    ТипДокументы
    #941483
    страница19 из 20
    1   ...   12   13   14   15   16   17   18   19   20
    %s

    229
    Обработка нажатия кнопоки "Заново " elif event.GetEventObject().GetLabel() == Заново ': clips.Reset()
    Обработка нажатия кнопоки "Назад " elif event.GetEventObject().GetLabel() == Назад ': clips.Eval("(prev_q_yes %s)" %
    (factlist[1].Index)) clips.Run() self.nextState()
    Обработка нажатия кнопки "Выход " def OnQuit(self, event): self.Close() # завершение работы приложения Класс приложения class PrintDiagApp(wx.App): def OnInit(self):
    # создание главного окна frame = MainFrame()
    # отображение главного окна frame.Show() return True if __name__ == '__main__': app = PrintDiagApp() app.MainLoop()

    230 Приложение Б Файл job.clp
    (defclass human
    (is-a USER) ;; пользовательский класс concrete)
    (pattern-match reactive)
    (slot education (type SYMBOL)(create-accessor read- write))
    (slot sphere (type SYMBOL)(create-accessor read-write))
    (slot lang (type SYMBOL)(create-accessor read-write))
    (slot comp (type SYMBOL)(create-accessor read-write))
    (slot managament (type SYMBOL)(create-accessor read- write))
    (slot experience (type SYMBOL)(create-accessor read- write))
    (slot experiencenegotiations (type SYMBOL)(create- accessor read-write))
    (slot communicating (type SYMBOL)(create-accessor read- write))
    (slot organized (type SYMBOL)(create-accessor read- write))
    (slot creative (type SYMBOL)(create-accessor read- write))
    (slot paul (type SYMBOL)(create-accessor read-write))
    (slot age (type SYMBOL)(create-accessor read-write))
    (slot driverscertificate (type SYMBOL)(create-accessor read-write))
    (slot graph (type SYMBOL)(create-accessor read-write) ) )
    (definstances humans (
    РРК
    of human
    (education 0)
    (sphere 0)
    (lang 0)
    (comp 0)
    (managament 0)
    (experience 0)
    (experiencenegotiations 0)
    (communicating 0)
    (organized 0)
    (creative 0)
    (paul 0)
    (age 0)
    (driverscertificate 0)
    (graph 0) ) )

    231
    (make-instance PPK of human)
    (deffunction check (?question ?answer)
    (switch ?question
    (case 1 then
    (switch ?answer
    (case 1 then (send [PPK] put-education higher))
    (case 2 then (send [PPK] put-education average-professional))
    (case 3 then (send [PPK] put-education average))
    (default 0) )
    )
    (case 2 then
    (switch ?answer
    (case 1 then (send [PPK] put-sphere economic))
    (case 2 then (send [PPK] put-sphere humanitarian))
    (case 3 then (send [PPK] put-sphere technical))
    (case 4 then (send [PPK] put-sphere other))
    (default 0) )
    )
    (case 3 then
    (switch ?answer
    (case 1 then (send [PPK] put-lang in- perfection))
    (case 2 then (send [PPK] put-lang talking))
    (case 3 then (send [PPK] put-lang reading))
    (case 4 then (send [PPK] put-lang no))
    (default 0) )
    )
    (case 4 then
    (switch ?answer
    (case 1 then (send [PPK] put-comp professional))
    (case 2 then (send [PPK] put-comp user))
    (case 3 then (send [PPK] put-comp no))
    (default 0) )
    )
    (case 5 then
    (switch ?answer
    (case 1 then (send [PPK] put-managament yes))
    (case 2 then (send [PPK] put-managament no))
    (default 0) )
    )
    (case 6 then
    (switch ?answer
    (case 1 then (send [PPK] put-experience yes))
    (case 2 then (send [PPK] put-experience no))
    (default 0) )
    )

    232
    (case 7 then
    (switch ?answer
    (case 1 then (send [PPK] put-communicating yes))
    (case 2 then (send [PPK] put-communicating no) )
    (default 0) )
    )
    (case 8 then
    (switch ?answer
    (case 1 then (send [PPK] put-organized yes))
    (case 2 then (send [PPK] put-organized no))
    (default 0) ) )
    (case 9 then
    (switch ?answer
    (case 1 then (send [PPK] put-creative yes))
    (case 2 then (send [PPK] put-creative no))
    (default 0) )
    )
    (case 10 then
    (switch ?answer
    (case 1 then (send [PPK] put-paul male))
    (case 2 then (send [PPK] put-paul female))
    (default 0) )
    )
    (case 11 then
    (send [PPK] put-age ?answer) )
    (case 12 then
    (switch ?answer
    (case 1 then (send [PPK] put- driverscertificate yes))
    (case 2 then (send [PPK] put- driverscertificate no))
    (default 0) )
    )
    (case 13 then
    (switch ?answer
    (case 1 then (send [PPK] put-graph full))
    (case 2 then (send [PPK] put-graph free))
    (case 3 then (send [PPK] put-graph unnormalized))
    (case 4 then (send [PPK] put-graph short))
    (default 0) )
    )
    (case 14 then
    (switch ?answer
    (case 1 then (send [PPK] put- experiencenegotiations yes))
    (case 2 then (send [PPK] put- experiencenegotiations no))
    (default 0) )
    ) ) )

    233 Правила для определения вакансии -- менеджер rule-manager
    (declare (salience 50))
    (object (name [PPK]) (education higher))
    (object (name [PPK]) (sphere economic))
    (object (name [PPK]) (communicating yes))
    (object (name [PPK]) (organized yes))
    (object (name [PPK]) (lang in-perfection))
    (object (name [PPK]) (comp professional | user))
    (object (name [PPK]) (paul male))
    (object (name [PPK]) (creative yes))
    (object (name [PPK]) (managament yes))
    (object (name [PPK]) (experience yes))
    (object (name [PPK]) (experiencenegotiations yes))
    (object (name [PPK]) (graph full))
    =>
    (assert (job-title менеджер) ) )
    ; -- маркетолог rule-market
    (declare (salience 50))
    (object (name [PPK])
    (education higher))
    (object (name [PPK])
    (sphere economic))
    (object (name [PPK])
    (communicating yes))
    (object (name [PPK])
    (organized yes))
    (object (name [PPK])
    (lang in-perfection))
    (object (name [PPK])
    (comp professional | user))
    (object (name [PPK])
    (paul male))
    (test (< (send [PPK] get-age) 35))
    (object (name [PPK])
    (creative yes))
    (object (name [PPK])
    (experiencenegotiations yes))(object (name [PPK])
    (graph full))
    =>
    (assert (job-title маркетолог) ) )
    ; -- бухгалтер rule-accountant
    (declare (salience 50))
    (object (name [PPK])
    (education higher))
    (object (name [PPK])
    (sphere economic))
    (object (name [PPK])
    (organized yes))
    (object (name [PPK])
    (comp professional))
    (object (name [PPK])
    (paul female))
    (object (name [PPK])
    (creative yes))
    (object (name [PPK])
    (graph unnormalized |

    234
    full))
    =>
    (assert (job-title бухгалтер) ) )
    ; -- специалист по связям с
    общественностью
    (defrule rule-public-relation
    (declare (salience 50))
    (object (name [PPK])
    (education higher))
    (object (name [PPK])
    (sphere humanitarian))
    (object (name [PPK])
    (communicating yes))(object (name [PPK])
    (organized yes))
    (object (name [PPK])
    (lang in-perfection))
    (object (name [PPK])
    (comp professional | user))
    (object (name [PPK])
    (creative yes))
    (object (name [PPK])
    (experiencenegotiations yes))
    (object (name [PPK])
    (graph full))
    =>
    (assert (job-title специалист по связям с
    общественностью
    ) ) )
    ; -- системный администратор rule-sys-admin
    (declare (salience 50))
    (object (name [PPK]) (education average | average- professional))
    (object (name [PPK]) (sphere technical))
    (object (name [PPK]) (lang in-perfection | talking
    | reading))
    (object (name [PPK]) (comp professional))
    (object (name [PPK]) (paul male))
    (object (name [PPK]) (graph full))
    =>
    (assert (job-title системный администратор) ) )
    ; -- разработчик приложений rule-developer
    (declare (salience 50))
    (object (name [PPK]) (education higher))
    (object (name [PPK]) (sphere technical))
    (object (name [PPK]) (lang in-perfection | talking
    | reading))
    (object (name [PPK]) (comp professional))
    (object (name [PPK]) (graph full | short | free))
    =>
    (assert (job-title разработчик приложений) ) )

    235
    ; -- web- программист rule-web
    (declare (salience 50))
    (job-title разработчик приложений)
    (object (name [PPK]) (creative yes))
    =>
    (assert (job-title web- программист) ) )
    ; -- водитель rule-driver
    (declare (salience 45))
    (object (name [PPK]) (paul male))
    (object (name [PPK]) (graph full | short))
    (object (name [PPK]) (driverscertificate yes))
    =>
    (assert (job-title водитель) ) )
    ; -- торговый представитель rule-representative
    (declare (salience 45))
    (object (name [PPK]) (communicating yes))
    (object (name [PPK]) (organized yes))
    (object (name [PPK]) (graph full | free))
    =>
    (assert (job-title торговый представитель) ) )
    ; -- секретарь rule-secretary
    (declare (salience 45))
    (object (name [PPK]) (education average- professional))
    (object (name [PPK]) (communicating yes))
    (object (name [PPK]) (organized yes))
    (object (name [PPK]) (lang in-perfection))
    (object (name [PPK]) (comp professional))
    (object (name [PPK]) (paul female))
    (object (name [PPK]) (graph full))
    =>
    (assert (job-title секретарь) ) )
    ; -- специалист по связям с
    общественностью
    (defrule rule-public-relation
    (declare (salience 50))
    (object (name [PPK])
    (education higher))
    (object (name [PPK])
    (sphere humanitarian))
    (object (name [PPK])
    (communicating yes))
    (object (name [PPK])
    (organized yes))

    236
    (object (name [PPK])
    (lang in-perfection))
    (object (name [PPK])
    (comp professional | user))
    (object (name [PPK])
    (creative yes))
    (object (name [PPK])
    (experiencenegotiations yes))
    (object (name [PPK])
    (graph full))
    =>
    (assert (job-title специалист по связям с
    общественностью
    ) ) )
    ; -- системный администратор rule-sys-admin
    (declare (salience 50))
    (object (name [PPK]) (education average | average- professional))
    (object (name [PPK]) (sphere technical))
    (object (name [PPK]) (lang in-perfection | talking | reading))
    (object (name [PPK]) (comp professional))
    (object (name [PPK]) (paul male))
    (object (name [PPK]) (graph full))
    =>
    (assert (job-title системный администратор) ) )
    ; -- предложение вакансий rule-list-vacancies
    (declare (salience 40))
    (job-title $?item)
    =>
    (bind ?str (implode$ ?item))
    (printout t crlf)
    (printout t "Вакансия ")
    (format t "%s%n" ?str))
    ; -- нет вакансий rule-no-vacancies
    (declare (salience 40))
    (not(job-title ?))
    =>
    (assert (job-title
    К
    сожалению
    , в
    данный моменту нас нет вакансий)

    237 Файл index.php
    } if (isset($_POST['sfera'])) { clips_function_call('check',"2 $_POST[sfera]");
    } if (isset($_POST['jazik'])) { clips_function_call('check',"3 $_POST[jazik]");
    } if (isset($_POST['comp'])) { clips_function_call('check',"4 $_POST[comp]");
    } if (isset($_POST['managament'])) { clips_function_call('check',"5 $_POST[managament]");
    } if (isset($_POST['experience'])) { clips_function_call('check',"6 $_POST[experience]");
    } if (isset($_POST['communicating'])) { clips_function_call('check',"7
    $_POST[communicating]");
    } if (isset($_POST['organized'])) { clips_function_call('check',"8 $_POST[organized]");
    } if (isset($_POST['creative'])) { clips_function_call('check',"9 $_POST[creative]");
    } if (isset($_POST['paul'])) { clips_function_call('check',"10 $_POST[paul]");
    } if (isset($_POST['age'])) { clips_function_call('check',"11 $_POST[age]");
    } if (isset($_POST['driverscertificate'])) { clips_function_call('check',"12
    $_POST[driverscertificate]");
    } if (isset($_POST['graph'])) { clips_function_call('check',"13 $_POST[graph]");
    }

    238
    if (isset($_POST['experiencenegotiations'])) { clips_function_call('check',"14
    $_POST[experiencenegotiations]");
    } if (isset($_POST['result'])) {
    $job_title = clips_get_fact_lits('job-title');
    }
    ?>
    1   ...   12   13   14   15   16   17   18   19   20


    написать администратору сайта