├── __init__.py
├── scripts
├── general
│ ├── reduced_form.txt
│ ├── move.sh
│ ├── reduced_title
│ ├── reduced_credits
│ ├── final_reduced_query
│ ├── reduced_syllabus
│ ├── test.py
│ ├── reduced_prof
│ └── querylist.txt
├── reduced
│ ├── reduced_type
│ ├── reduced_prerequisites
│ ├── reduced_title
│ ├── reduced_homepage
│ ├── reduced_gradeAA
│ ├── reduced_gradeAB
│ ├── reduced_gradeAP
│ ├── reduced_gradeBB
│ ├── reduced_gradeBC
│ ├── reduced_gradeCC
│ ├── reduced_gradeCD
│ ├── reduced_gradeDD
│ ├── reduced_gradeDX
│ ├── reduced_gradeFR
│ ├── reduced_references
│ ├── reduced_grades
│ ├── reduced_venue
│ ├── reduced_duration
│ ├── reduced_studentstrength
│ ├── reduced_credits
│ ├── reduced_syllabus
│ └── reduced_prof
├── raw_query
│ ├── raw_query_type
│ ├── raw_query_prerequisites
│ ├── raw_query_title
│ ├── raw_query_homepage
│ ├── raw_query_gradeAP
│ ├── raw_query_gradeBB
│ ├── raw_query_gradeBC
│ ├── raw_query_gradeCC
│ ├── raw_query_gradeCD
│ ├── raw_query_gradeDD
│ ├── raw_query_gradeDX
│ ├── raw_query_gradeFR
│ ├── raw_query_references
│ ├── raw_query_venue
│ ├── raw_query_grades
│ ├── raw_query_duration
│ ├── raw_query_gradeAB
│ ├── raw_query_gradeAA
│ ├── raw_query_studentstrength
│ ├── raw_query_credits
│ ├── raw_query_syllabus
│ └── raw_query_prof
├── replace.py
├── readme.txt
├── data
│ ├── cs691.txt
│ ├── cs692.txt
│ ├── cs341.txt
│ ├── cs721.txt
│ ├── cs218.txt
│ ├── cs620.txt
│ ├── cs386.txt
│ ├── cs606.txt
│ ├── cs215.txt
│ ├── cs317.txt
│ ├── cs387.txt
│ ├── cs305.txt
│ ├── write.py
│ ├── cs641.txt
│ ├── create_txt.sh
│ ├── cs251.txt
│ ├── cs601.txt
│ ├── cs213.txt
│ ├── cs207.txt
│ ├── cs344.txt
│ ├── cs631.txt
│ ├── cs293.txt
│ ├── cs747.txt
│ ├── cs725.txt
│ ├── cs224.txt
│ ├── cs475.txt
│ ├── cs675.txt
│ ├── cs618.txt
│ ├── cs663.txt
│ ├── cs682.txt
│ ├── cs101.txt
│ ├── cs683.txt
│ ├── cs616.txt
│ ├── cs684.txt
│ ├── cs613.txt
│ ├── cs740.txt
│ ├── cs745.txt
│ ├── cs615.txt
│ └── cs738.txt
├── generate_shell.py
└── reduction.py
├── nlp.pptx
├── MyKernel.pyc
├── aiml
├── README.md
└── standard
│ ├── loebner10.aiml
│ ├── iu.aiml
│ ├── continuation.aiml
│ ├── std-startup.xml
│ ├── stack.aiml
│ ├── reductions-update.aiml
│ ├── interjection.aiml
│ ├── xfind.aiml
│ ├── std-pickup.aiml
│ ├── primitive-math.aiml
│ ├── date.aiml
│ ├── bot_profile.aiml
│ ├── badanswer.aiml
│ ├── inquiry.aiml
│ └── update_mccormick.aiml
├── readme.txt
├── MyKernel.py
└── chatbot.py
/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/scripts/general/reduced_form.txt:
--------------------------------------------------------------------------------
1 | /// who teach ///
2 |
3 |
--------------------------------------------------------------------------------
/nlp.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/piyushiiitn/Amanda--NLP-Based-Chatbot/HEAD/nlp.pptx
--------------------------------------------------------------------------------
/MyKernel.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/piyushiiitn/Amanda--NLP-Based-Chatbot/HEAD/MyKernel.pyc
--------------------------------------------------------------------------------
/scripts/reduced/reduced_type:
--------------------------------------------------------------------------------
1 | type cs747 course
2 | cs747 theory course lab
3 | cs747 type
4 | type cs747
5 | theory lab cs747
6 | lab theory cs747
7 | cs747 lab theory
8 | cs747 theory lab
9 |
--------------------------------------------------------------------------------
/scripts/general/move.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | HOME=$(pwd)
3 | cd scripts
4 | #rm -f reduced_*
5 | #python reduction.py
6 | #python create_aiml.py
7 | mv $HOME/scripts/cs344.aiml $HOME/aiml/dept/cs344.aiml
8 | cd ..
9 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_type:
--------------------------------------------------------------------------------
1 | What is the type of cs344 course?
2 | Is cs344 a theory course or lab?
3 | cs344 type?
4 | type cs344?
5 | theory lab cs344?
6 | lab theory cs344?
7 | cs344 lab theory?
8 | cs344 theory lab?
9 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_prerequisites:
--------------------------------------------------------------------------------
1 | prereq cs747
2 | prerequistes cs747
3 | course bash cs747
4 | cs747 prereq
5 | prereq cs747
6 | cs747 prerequistes
7 | prerequistes cs747
8 | cs747 prerequiste
9 | prerequiste cs747
10 |
--------------------------------------------------------------------------------
/scripts/general/reduced_title:
--------------------------------------------------------------------------------
1 | name cs344
2 | title cs344
3 | course code cs344 name
4 | course cs344 title
5 | course name cs344
6 | cs344 course name
7 | cs344 course title
8 | name cs344
9 | title cs344
10 | academician name cs344
11 |
12 |
--------------------------------------------------------------------------------
/aiml/README.md:
--------------------------------------------------------------------------------
1 | make-chatterbot
2 | ===============
3 |
4 | aiml/
5 | -----
6 |
7 | The aiml directory is where AIML files are stored. The `standard/` directory
8 | contains the patterns loaded by default. New files can be included in `aiml/`
9 | as well.
10 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_title:
--------------------------------------------------------------------------------
1 | name cs747
2 | title cs747
3 | course code cs747 name
4 | course cs747 title
5 | course name cs747
6 | cs747 course name
7 | cs747 course title
8 | name cs747
9 | cs747 name
10 | title cs747
11 | cs747 title
12 | academician name cs747
13 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_prerequisites:
--------------------------------------------------------------------------------
1 | What are the prereq for cs344?
2 | What are the prerequistes for cs344?
3 | Which courses are to be done before cs344?
4 | cs344 prereq
5 | prereq cs344
6 | cs344 prerequistes
7 | prerequistes cs344
8 | cs344 prerequiste
9 | prerequiste cs344
10 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_homepage:
--------------------------------------------------------------------------------
1 | home page cs747
2 | coursite cs747
3 | homepage link cs747
4 | link cs747
5 | tell website cs747
6 | url cs747
7 | cs747 url
8 | academician profile cs747
9 | academician link cs747
10 | academician website cs747
11 | discovery information cs747
12 | know cs747
13 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_title:
--------------------------------------------------------------------------------
1 | What is the name of CS344?
2 | What is the title of CS344?
3 | Course code cs344 name?
4 | Course cs344 title?
5 | course name cs344?
6 | cs344 course name?
7 | cs344 course title?
8 | name cs344?
9 | cs344 name?
10 | title cs344?
11 | cs344 title?
12 | Academic name of cs344?
13 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeAA:
--------------------------------------------------------------------------------
1 | many student receive aa cs747
2 | many student get aa cs747
3 | student receive aa class cs747
4 | many student receive aa class cs747
5 | many student get aa class cs747
6 | many aa class give cs747
7 | aa class cs747
8 | aa cs747
9 | student aa class cs747
10 | student aa cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeAB:
--------------------------------------------------------------------------------
1 | many student receive ab cs747
2 | many student get ab cs747
3 | student receive ab class cs747
4 | many student receive ab class cs747
5 | many student get ab class cs747
6 | many ab class give cs747
7 | ab class cs747
8 | ab cs747
9 | student ab class cs747
10 | student ab cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeAP:
--------------------------------------------------------------------------------
1 | many student receive ap cs747
2 | many student get ap cs747
3 | student receive ap class cs747
4 | many student receive ap class cs747
5 | many student get ap class cs747
6 | many ap class give cs747
7 | ap class cs747
8 | ap cs747
9 | student ap class cs747
10 | student ap cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeBB:
--------------------------------------------------------------------------------
1 | many student receive bb cs747
2 | many student get bb cs747
3 | student receive bb class cs747
4 | many student receive bb class cs747
5 | many student get bb class cs747
6 | many bb class give cs747
7 | bb class cs747
8 | bb cs747
9 | student bb class cs747
10 | student bb cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeBC:
--------------------------------------------------------------------------------
1 | many student receive bc cs747
2 | many student get bc cs747
3 | student receive bc class cs747
4 | many student receive bc class cs747
5 | many student get bc class cs747
6 | many bc class give cs747
7 | bc class cs747
8 | bc cs747
9 | student bc class cs747
10 | student bc cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeCC:
--------------------------------------------------------------------------------
1 | many student receive cc cs747
2 | many student get cc cs747
3 | student receive cc class cs747
4 | many student receive cc class cs747
5 | many student get cc class cs747
6 | many cc class give cs747
7 | cc class cs747
8 | cc cs747
9 | student cc class cs747
10 | student cc cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeCD:
--------------------------------------------------------------------------------
1 | many student receive cd cs747
2 | many student get cd cs747
3 | student receive cd class cs747
4 | many student receive cd class cs747
5 | many student get cd class cs747
6 | many cd class give cs747
7 | cd class cs747
8 | cd cs747
9 | student cd class cs747
10 | student cd cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeDD:
--------------------------------------------------------------------------------
1 | many student receive dd cs747
2 | many student get dd cs747
3 | student receive dd class cs747
4 | many student receive dd class cs747
5 | many student get dd class cs747
6 | many dd class give cs747
7 | dd class cs747
8 | dd cs747
9 | student dd class cs747
10 | student dd cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeDX:
--------------------------------------------------------------------------------
1 | many student receive dx cs747
2 | many student get dx cs747
3 | student receive dx class cs747
4 | many student receive dx class cs747
5 | many student get dx class cs747
6 | many dx class give cs747
7 | dx class cs747
8 | dx cs747
9 | student dx class cs747
10 | student dx cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_gradeFR:
--------------------------------------------------------------------------------
1 | many student receive fr cs747
2 | many student get fr cs747
3 | student receive fr class cs747
4 | many student receive fr class cs747
5 | many student get fr class cs747
6 | many fr class give cs747
7 | fr class cs747
8 | fr cs747
9 | student fr class cs747
10 | student fr cs747
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_references:
--------------------------------------------------------------------------------
1 | mention cs747
2 | book recommend cs747
3 | cs747 mention
4 | mention cs747
5 | read cs747
6 | cs747 survey material
7 | survey material cs747
8 | suggest good book cs747
9 | book recommend cs747
10 | mention cs747
11 | mention cs747
12 | cs747 mention
13 | book cs747
14 | cs747 book
15 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_grades:
--------------------------------------------------------------------------------
1 | class stats cs747
2 | class statistics cs747
3 | class statistics cs747
4 | class stats cs747
5 | many student receive ap cs747
6 | student receive ap class cs747
7 | student receive ap class cs747
8 | collective scaling stats cs747
9 | collective class statistics cs747
10 | many class give cs747
11 | number class give cs747
12 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_venue:
--------------------------------------------------------------------------------
1 | venue lecture cs747
2 | cs747 class return
3 | time slot cs747
4 | time cs747 class return
5 | venue cs747
6 | time slot cs747
7 | cs747 return
8 | cs747 return
9 | cs747 venue
10 | cs747 time slot
11 | venue cs747
12 | time slot cs747
13 | time cs747
14 | topographicpoint cs747
15 | venue cs747 class
16 | venue cs747 lecture
17 |
--------------------------------------------------------------------------------
/scripts/replace.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | f1 = open('create_aiml.py','r')
4 |
5 | f2 = open(sys.argv[1],'r')
6 | lines = f2.readlines()
7 | print len(lines)
8 |
9 | g = open('cpy_aiml.py','w')
10 |
11 | i = 1
12 | for line in f1:
13 | if (i <= 22):
14 | g.write(lines[i-1]);
15 | i = i+1
16 | else:
17 | g.write(line)
18 |
19 | g.close()
20 | f2.close()
21 | f1.close()
22 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_homepage:
--------------------------------------------------------------------------------
1 | What is the home page of cs344?
2 | Coursite cs344?
3 | Homepage link cs344?
4 | Link cs344?
5 | Can you tell me the website of cs344?
6 | Url of cs344?
7 | cs344 url?
8 | academic profile of cs344?
9 | academic link of cs344?
10 | academic website of cs344?
11 | Where can I find more information about cs344?
12 | How to know more about cs344?
13 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeAP:
--------------------------------------------------------------------------------
1 | How many students received AP in CS344?
2 | How many students got AP in CS344?
3 | Students receiving AP grade in CS344?
4 | How many students received AP grade in CS344?
5 | How many students got AP grade in CS344?
6 | How many AP grades were given in CS344?
7 | AP grades in CS 344?
8 | AP in CS344?
9 | students with AP grade in CS344?
10 | students with AP in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeBB:
--------------------------------------------------------------------------------
1 | How many students received BB in CS344?
2 | How many students got BB in CS344?
3 | Students receiving BB grade in CS344?
4 | How many students received BB grade in CS344?
5 | How many students got BB grade in CS344?
6 | How many BB grades were given in CS344?
7 | BB grades in CS 344?
8 | BB in CS344?
9 | students with BB grade in CS344?
10 | students with BB in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeBC:
--------------------------------------------------------------------------------
1 | How many students received BC in CS344?
2 | How many students got BC in CS344?
3 | Students receiving BC grade in CS344?
4 | How many students received BC grade in CS344?
5 | How many students got BC grade in CS344?
6 | How many BC grades were given in CS344?
7 | BC grades in CS 344?
8 | BC in CS344?
9 | students with BC grade in CS344?
10 | students with BC in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeCC:
--------------------------------------------------------------------------------
1 | How many students received CC in CS344?
2 | How many students got CC in CS344?
3 | Students receiving CC grade in CS344?
4 | How many students received CC grade in CS344?
5 | How many students got CC grade in CS344?
6 | How many CC grades were given in CS344?
7 | CC grades in CS 344?
8 | CC in CS344?
9 | students with CC grade in CS344?
10 | students with CC in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeCD:
--------------------------------------------------------------------------------
1 | How many students received CD in CS344?
2 | How many students got CD in CS344?
3 | Students receiving CD grade in CS344?
4 | How many students received CD grade in CS344?
5 | How many students got CD grade in CS344?
6 | How many CD grades were given in CS344?
7 | CD grades in CS 344?
8 | CD in CS344?
9 | students with CD grade in CS344?
10 | students with CD in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeDD:
--------------------------------------------------------------------------------
1 | How many students received DD in CS344?
2 | How many students got DD in CS344?
3 | Students receiving DD grade in CS344?
4 | How many students received DD grade in CS344?
5 | How many students got DD grade in CS344?
6 | How many DD grades were given in CS344?
7 | DD grades in CS 344?
8 | DD in CS344?
9 | students with DD grade in CS344?
10 | students with DD in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeDX:
--------------------------------------------------------------------------------
1 | How many students received DX in CS344?
2 | How many students got DX in CS344?
3 | Students receiving DX grade in CS344?
4 | How many students received DX grade in CS344?
5 | How many students got DX grade in CS344?
6 | How many DX grades were given in CS344?
7 | DX grades in CS 344?
8 | DX in CS344?
9 | students with DX grade in CS344?
10 | students with DX in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeFR:
--------------------------------------------------------------------------------
1 | How many students received FR in CS344?
2 | How many students got FR in CS344?
3 | Students receiving FR grade in CS344?
4 | How many students received FR grade in CS344?
5 | How many students got FR grade in CS344?
6 | How many FR grades were given in CS344?
7 | FR grades in CS 344?
8 | FR in CS344?
9 | students with FR grade in CS344?
10 | students with FR in CS344?
11 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_duration:
--------------------------------------------------------------------------------
1 | hanker cs747 run
2 | duration cs747
3 | duration cs747
4 | cs747 duration
5 | time duration cs747
6 | time duration cs747
7 | time timeperiod cs747
8 | cs747 time timeperiod
9 | much semester cs747 return
10 | length cs747 course
11 | many days cs747 run
12 | length cs747
13 | cs747 length
14 | span cs747
15 | cs747 span
16 | hanker cs747 get stretch
17 | many calendarmonth return complete cs747
18 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_references:
--------------------------------------------------------------------------------
1 | What are references for cs344?
2 | Which book is recommended for cs344?
3 | cs344 reference?
4 | reference cs344?
5 | What to read for cs344?
6 | cs344 study material?
7 | study material cs344?
8 | Can you suggest good books for cs344?
9 | Which books are recommended for cs344?
10 | What are the references for cs344?
11 | references cs344?
12 | cs344 references?
13 | books cs344?
14 | cs344 books?
15 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_studentstrength:
--------------------------------------------------------------------------------
1 | many student use cs747
2 | many student survey cs747
3 | number student cs747
4 | student cs747
5 | student cs747
6 | student survey cs747
7 | number student return cs747
8 | student return cs747
9 | student return cs747
10 | student stats cs747
11 | student statistics cs747
12 | student statistics cs747
13 | student stats cs747
14 | number student return cs747
15 | number student return cs747
16 | number student survey cs747
17 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_venue:
--------------------------------------------------------------------------------
1 | What is the venue for lectures of CS344?
2 | Where is CS344 classes being taken?
3 | What is the time slot for CS344?
4 | At what time is CS344 classes taken?
5 | What is the venue for CS344?
6 | What is the time slot for CS344?
7 | When is CS344 taken?
8 | Where is CS344 taken?
9 | CS344 venue?
10 | CS344 time slot?
11 | venue CS344?
12 | time slot CS344?
13 | time CS344?
14 | place CS344?
15 | venue for CS344 classes?
16 | venue for CS344 lectures?
17 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_grades:
--------------------------------------------------------------------------------
1 | What are the grading stats for CS 344?
2 | What are the grading statistics for CS 344?
3 | Grading statistics for CS344?
4 | Grading stats for CS 344?
5 | How many students received AP in CS 344?
6 | Students receiving AP grade in CS 344?
7 | Students who received AP grade in CS 344?
8 | What are the collective grading stats for CS 344?
9 | Collective grading statistics for CS344?
10 | How many grades were given in CS344?
11 | Number of grades given in CS344?
12 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_duration:
--------------------------------------------------------------------------------
1 | How long will cs344 run?
2 | What is the duration of CS344?
3 | duration cs344?
4 | cs344 duration?
5 | time duration cs344?
6 | What is the time duration of cs344?
7 | Time period of cs344?
8 | cs344 time period?
9 | How much of the semester will cs344 take?
10 | What is the length of cs344 course?
11 | For how many days, will cs344 run?
12 | length cs344?
13 | cs344 length?
14 | span cs344?
15 | cs344 span?
16 | How long will cs344 get stretched?
17 | How many months will it take to complete cs344?
18 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeAB:
--------------------------------------------------------------------------------
1 | How many students received AB in CS344?
2 | How many students got AB in CS344?
3 | Students receiving AB grade in CS344?
4 | How many students received AB grade in CS344?
5 | How many students got AB grade in CS344?
6 | How many AB grades were given in CS344?
7 | AB grades in CS 344?
8 | AB in CS344?
9 | students with AB grade in CS344?
10 | students with AB in CS344?
11 | students who received AB grade in CS344?
12 | Number of students with AB grade in CS344?
13 | Number of students with AB in CS344?
14 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_gradeAA:
--------------------------------------------------------------------------------
1 | How many students received AA in CS344?
2 | How many students got AA in CS344?
3 | Students receiving AA grade in CS344?
4 | How many students received AA grade in CS344?
5 | How many students got AA grade in CS344?
6 | How many AA grades were given in CS344?
7 | AA grades in CS 344?
8 | AA in CS344?
9 | students with AA grade in CS344?
10 | students with AA in CS344?
11 | students who received AA grade in CS344?
12 | Number of students with AA grade in CS344?
13 | Number of students with AA in CS344?
14 |
15 |
--------------------------------------------------------------------------------
/scripts/readme.txt:
--------------------------------------------------------------------------------
1 | Following is the control flow of scripts:
2 |
3 | 1] python reduction.py:
4 | raw_query -> reduced_query
5 | 2] python create_aiml.py:
6 | reduced_query -> cs344.aiml
7 | 3] ./generate_shell.py
8 | write the template_course.txt
9 | 4] Copy template_course.txt and paste below a line in replace.sh which says :-
10 | "#--------------paste template data below here-----------------"
11 |
12 | 5] Run ./replace.sh
13 |
14 | Note: replace.py is just a helping script used by replace.sh,
15 | it is just changing headers of course.aiml files
16 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_credits:
--------------------------------------------------------------------------------
1 | many credits cs747 worth
2 | many credits cs747
3 | number credits cs747
4 | number credits cs747
5 | cs747 worth many credits
6 | cs747 worth number credits
7 | many credits cs747 worth
8 | many credits cs747
9 | number credits cs747
10 | number credits cs747
11 | cs747 worth many credits
12 | cs747 worth number credits
13 | cs747 credits addition
14 | addition cs747 credits
15 | cs747 credits
16 | credits cs747
17 | many credits get complete cs747
18 | cs747 give many credits
19 | kitne credits ka hai cs747
20 | sum hours give weekly cs747
21 | many hours give cs747
22 |
--------------------------------------------------------------------------------
/scripts/general/reduced_credits:
--------------------------------------------------------------------------------
1 | many credits cs344 worth
2 | many credits cs344
3 | number credits cs344
4 | number credits cs344
5 | cs344 worth many credits
6 | cs344 worth number credits
7 | many credits cs344 worth
8 | many credits cs344
9 | number credits cs344
10 | number credits cs344
11 | cs344 worth many credits
12 | cs344 worth number credits
13 | cs344 credits addition
14 | addition cs344 credits
15 | cs344 credits
16 | credits cs344
17 | many credits get complete cs344
18 | cs344 give many credits
19 | kitne credits ka hai cs344
20 | sum hours give weekly cs344
21 | many hours give cs344
22 |
23 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_studentstrength:
--------------------------------------------------------------------------------
1 | How many students have applied for CS 344?
2 | How many students are studying CS344?
3 | Number of students in CS 344?
4 | Students in CS 344?
5 | No. of students in CS 344?
6 | Students studying in CS 344?
7 | Number of students taking CS 344?
8 | Students taking CS 344?
9 | Students taking CS344?
10 | Student stats for CS 344?
11 | Student statistics for CS 344?
12 | What are the student statistics for CS 344?
13 | What are the student stats for CS 344?
14 | What number of students have taken CS 344?
15 | What number of students are taking CS 344?
16 | What number of students are studying CS 344?
17 |
--------------------------------------------------------------------------------
/scripts/general/final_reduced_query:
--------------------------------------------------------------------------------
1 | cs344 taught
2 | cs344 taught professor
3 | cs344 teach
4 | cs344 teach professor
5 | cs344 teach teacher
6 | instruct cs344
7 | instruct cs344 semester
8 | instructs cs344
9 | instructs cs344 semester
10 | professor instruct cs344
11 | professor instruct cs344 semester
12 | professor instructs cs344
13 | professor instructs cs344 semester
14 | professor teach cs344
15 | professor teach cs344 semester
16 | teach cs344
17 | teach cs344 semester
18 | teacher insructing cs344 semester
19 | teacher instruct cs344
20 | teacher instruct cs344 semester
21 | teacher instructs cs344
22 | teacher instructs cs344 semester
23 | teacher teach cs344
24 | teacher teach cs344 semester
25 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | Make sure these are installed on your system before running the code:
2 |
3 | Pyaiml, Python 2.7, NLTK libraries, Kivy Graphics library
4 |
5 | Follow Below Instructions for control of Flow of Scripts:
6 |
7 | 1. python reduction.py:
8 | raw_query -> reduced_query
9 | 2. python create_aiml.py:
10 | reduced_query -> cs344.aiml
11 | 3. ./generate_shell.py
12 | write the template_course.txt
13 | 4. Copy template_course.txt and paste below a line in replace.sh which says :-
14 | "#--------------paste template data below here-----------------"
15 |
16 | 5. Run ./replace.sh
17 |
18 | Note: replace.py is just a helping script used by replace.sh,
19 | it is just changing headers of course.aiml files
20 |
21 | To run the bot, execute python chatbot.py
22 |
--------------------------------------------------------------------------------
/scripts/data/cs691.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs691.aiml','w')
4 |
5 | COURSECODE = "691"
6 | PROFESSOR = "---"
7 | CREDITS = "0"
8 | SYLLABUS = "N/A"
9 | TITLE = "R , D Project I"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs692.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs692.aiml','w')
4 |
5 | COURSECODE = "692"
6 | PROFESSOR = "---"
7 | CREDITS = "0"
8 | SYLLABUS = "N/A"
9 | TITLE = "R , D Project II"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs341.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs341.aiml','w')
4 |
5 | COURSECODE = "341"
6 | PROFESSOR = "Bhaskar Raman"
7 | CREDITS = "4"
8 | SYLLABUS = "N/A"
9 | TITLE = "Computer Architecture"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Lab"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs721.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs721.aiml','w')
4 |
5 | COURSECODE = "721"
6 | PROFESSOR = "Nutan Limaye"
7 | CREDITS = "6"
8 | SYLLABUS = "N/A"
9 | TITLE = "Introduction to Computational Complexity"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs218.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs218.aiml','w')
4 |
5 | COURSECODE = "218"
6 | PROFESSOR = "Bharat Adsul"
7 | CREDITS = "0"
8 | SYLLABUS = "N/A"
9 | TITLE = "Design and Analysis of Algorithms"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "CS213 or EE717"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs620.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs620.aiml','w')
4 |
5 | COURSECODE = "620"
6 | PROFESSOR = "Raju Rangaswamy"
7 | CREDITS = "6"
8 | SYLLABUS = "N/A"
9 | TITLE = "New Trends in Information Technology "
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~cs620/"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_credits:
--------------------------------------------------------------------------------
1 | How many credits is CS344 worth of?
2 | How many credits are there in CS344?
3 | What are the number of credits in CS344?
4 | What is the number of credits in CS344?
5 | CS344 is worth how many credits?
6 | CS344 is worth what number of credits?
7 | How many credits is CS 344 worth of?
8 | How many credits are there in CS 344?
9 | What are the number of credits in CS 344?
10 | What is the number of credits in CS 344?
11 | CS 344 is worth how many credits?
12 | CS 344 is worth what number of credits?
13 | CS344 credits gain?
14 | Gain cs344 credits?
15 | cs344 credits?
16 | credits cs344?
17 | how many credits will I get after completing cs344?
18 | CS344 will give me how many credits?
19 | Kitne credits ka hai CS344?
20 | Amount of hours devoted weekly to CS344?
21 | How many hours should be devoted to CS344?
22 |
--------------------------------------------------------------------------------
/scripts/data/cs386.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs386.aiml','w')
4 |
5 | COURSECODE = "386"
6 | PROFESSOR = "Siva Kumar G."
7 | CREDITS = "3"
8 | SYLLABUS = "The laboratory will emphasize the use of PROLOG, LISP, CLOS (Common Lisp Object Systems), Expert System Shells, tools from public domain, and in-house work."
9 | TITLE = "Artificial Intelligence Lab"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Lab"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs606.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs606.aiml','w')
4 |
5 | COURSECODE = "606"
6 | PROFESSOR = "Abhiram Ranade"
7 | CREDITS = "6"
8 | SYLLABUS = "Elementary Parallel Algorithms, Graph Embeddings, Packet Routing, Communication Networks, VLSI Layouts, Map Reduce"
9 | TITLE = "Foundations of Parallel Computation"
10 | STUDENTSTRENGTH = "18"
11 | VENUE = "SIC 301"
12 | VENUE1 = "SIC 301, KreSit"
13 | TIMESLOT = "1"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["1","1","1","3","1","4","5","0","0","2"]
16 | grade_index={'AP':0,'AA':1,'AB':2,'BB':3,'BC':4,'CC':5,'CD':6,'DD':7,'DX':8,'FR':9}
17 | REFERENCES = "VLSI Layouts, Parallel Computing Berkley"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~ranade/606/"
21 | PREREQUISITES = "CS218"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs215.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs215.aiml','w')
4 |
5 | COURSECODE = "215"
6 | PROFESSOR = "Ajit Rajwade / Suyash Awate"
7 | CREDITS = "0"
8 | SYLLABUS = "See course home page below."
9 | TITLE = "Data Interpretation and Analysis"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Course textbook: Introduction to Probability and Statistics for Engineers and Scientists: Fourth Edition"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~ajitvr/CS215_Fall2015/"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs317.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs317.aiml','w')
4 |
5 | COURSECODE = "317"
6 | PROFESSOR = "NL. Sarda"
7 | CREDITS = "6"
8 | SYLLABUS = "SQL, JDBC, Database Design, Query Processing, Transaction Systems"
9 | TITLE = "Introduction to Database Systems"
10 | STUDENTSTRENGTH = "131"
11 | VENUE = "LH 301"
12 | VENUE1 = "Lecture Hall 301"
13 | TIMESLOT = "6"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","20","15","30","18","13","20","7","0","8"]
16 | grade_index={'AP':0,'AA':1,'AB':2,'BB':3,'BC':4,'CC':5,'CD':6,'DD':7,'DX':8,'FR':9}
17 | REFERENCES = "Abraham Silberschatz, Henry F. Korth and S. Sudarshan, Database System Concepts 5th Ed, McGraw Hill, 2006"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.moodle.iiitnr.ac.in/course/"
21 | PREREQUISITES = "CS213"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/general/reduced_syllabus:
--------------------------------------------------------------------------------
1 | contents cs344
2 | courseofstudy cs344
3 | contents screen cs344
4 | courseofstudy screen cs344
5 | courseofstudy cs344
6 | outline cs344
7 | things screen cs344
8 | things include cs344
9 | contents cs344
10 | courseofstudy cs344
11 | contents screen cs344
12 | courseofstudy screen cs344
13 | courseofstudy cs344
14 | outline cs344
15 | things screen cs344
16 | things include cs344
17 | learn cs344
18 | enlighten complete cs344
19 | professor teach cs344
20 | professor go teach cs344
21 | teacher go teach cs344
22 | teacher go teach cs344
23 | courseofstudy cs344
24 | cs344 courseofstudy
25 | courseofstudy cs344
26 | get learn cs344
27 | survey cs344
28 | survey cs344
29 | survey cs344
30 | survey cs344
31 | cs344 survey
32 | survey cs344
33 | expect cs344
34 | professor expect teach cs344
35 | course plan cs344
36 | tell professor teach cs344
37 | courseofstudy cs344
38 | cs344 courseofstudy
39 | outline cs344
40 | cs344 outline
41 | scope cs344
42 | cs344 scope
43 | scope cs344
44 |
45 |
--------------------------------------------------------------------------------
/aiml/standard/loebner10.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | NORESP
13 |
Are you bz?
Are you busy?
Is anyone there?
You haven't said anything.
I'm here waiting for you.
Get back to me when you are ready.
Hello?
I'm waiting.
Did you mean to send me a blank message?
Your message was blank or incomplete, Send anyway (Y/N)?
. PUSH YOU
17 |
18 |
19 |
--------------------------------------------------------------------------------
/scripts/data/cs601.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs601.aiml','w')
4 |
5 | COURSECODE = "601"
6 | PROFESSOR = "Vishwanathan Sundar"
7 | CREDITS = "6"
8 | SYLLABUS = "Techniques for the Design and Analysis of Algorithms. Formal models of computation, time and space complexity, Theory of NP-Completeness, Approximability of NP-Hard problems. Introduction to parallel, randomized and on-line algorithms."
9 | TITLE = "Algorithms and Complexity"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "J. Kleinberg and E. Tardos, Algorithm Design, Addison Wesley, 2005. T. H. Cormen , C. E. Leiserson, R. L. Rivest and C. Stein, Introduction to Algorithms, MIT Press and McGraw Hill, 3rd Edition, 2009 . M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~cs601/"
21 | PREREQUISITES = "NIL"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs213.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs213.aiml','w')
4 |
5 | COURSECODE = "213"
6 | PROFESSOR = "A. A. Diwan"
7 | CREDITS = "6"
8 | SYLLABUS = "Introduction to data structures, abstract data types, analysis of algorithms. Creation and manipulation of data structures: arrays, lists, stacks, queues, trees, heaps, hash tables, balanced trees, tries, graphs. Algorithms for sorting and searching, order statistics, depth-first and breadth-first search, shortest paths and minimum spanning tree."
9 | TITLE = "Data Structures and Algorithms"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1. T. Cormen, C. Leiserson, R. Rivest, C. Stein, Introduction to Algorithms, 2nd edition, Prentice-Hall India, 2001.2. S. Sahni, Data Structures, Algorithms and Applications in C++,2nd edition, Universities Press,2005."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs207.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs207.aiml','w')
4 |
5 | COURSECODE = "207"
6 | PROFESSOR = "S. Akshay"
7 | CREDITS = "6"
8 | SYLLABUS = "Propositions and predicates, proofs and proof techniques. Sets, relations and functions, cardinality, basic counting., Posets and lattices: Dilworth's theorem, inversion and distributive lattices., Graph theory : paths, cycles, trees, connectivity. , Group theory : Lagrange's theorem, homomorphisms, applications."
9 | TITLE = "Discrete Structures"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1. Kenneth Rosen, Discrete Mathematics and its applications, 5th edition, Tata-McGraw Hill, 2002., 2. C.L. Liu, Elements of Discrete mathematics, McGraw-Hill, 1985., 3. D. B. West, Introduction to Graph Theory, Prentice Hall of , India, 1998., 4. M. Artin, Algebra, Prentice-Hall India, 1991."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs344.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs344.aiml','w')
4 |
5 | COURSECODE = "344"
6 | PROFESSOR = "G. Shivakumar"
7 | CREDITS = "6"
8 | SYLLABUS = "Search, Logic, Constraint Programming, Neural Networks"
9 | TITLE = "Introduction to Artificial Intelligence"
10 | STUDENTSTRENGTH = "95"
11 | VENUE = "LH 301"
12 | VENUE1 = "Lecture Hall 301"
13 | TIMESLOT = "2"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["1","9","14","35","21","2","2","8","0","3"]
16 | grade_index={'AP':0,'AA':1,'AB':2,'BB':3,'BC':4,'CC':5,'CD':6,'DD':7,'DX':8,'FR':9}
17 | REFERENCES = "George F.Luger and William A. Stubblefield, AI: Structures and Strategies for Complex problem solving, 2nd edition, Benjamin Cummins Publishers, 1997. Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, Prentice Hall Series in AI, 1995. Mark Stefik, Introduction to Knowledge Systems, Morgan Kaufmann, 1995. Winston P.H., Artificial Intelligence, 3rd edition, Addison Wesley, 1995. E. Rich and K.Knight, Artificial Intelligence, Tata McGraw Hill, 1992. E. Charniack and D. Mcdermott, Artificial Intelligence, Addison Wesley, 1987. N.J.Nilsson, Principles of Artificial Intelligence, Morgan Kaufmann, 1985"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in"
21 | PREREQUISITES = "None"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs631.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs631.aiml','w')
4 |
5 | COURSECODE = "631"
6 | PROFESSOR = "Sudarshan S."
7 | CREDITS = "6"
8 | SYLLABUS = "Physical storage and indexing structures, Query processing algorithms, Query optimization, Transaction processing and serializability, Concurrency Control, Recovery. , Big data management: transaction and query processing on parallel and distributed databases including issues of availability, replication, consistency, concurrency control, and recovery. , Emerging database trends."
9 | TITLE = "Implementation Techniques for Relational Database Systems"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Abraham Silberschatz, Henry F. Korth and S. Sudarshan, Database System Concepts 6th Ed, McGraw Hill, 2010.. , Transaction Processing, Concepts and Techniques, J. Gray and A. Reuter, Morgan Kauffman, 1994., Research papers from leading conferences and journals"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/infolab/Data/Courses/CS631/"
21 | PREREQUISITES = "Nil"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs293.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs293.aiml','w')
4 |
5 | COURSECODE = "293"
6 | PROFESSOR = "A. A. Diwan"
7 | CREDITS = "3"
8 | SYLLABUS = "Implementation of, and experiments with, basic data structures and use in dynamic operations on data for different algorithms and problem domains; comparison of asymptotic complexity with real behaviour of algorithms; project."
9 | TITLE = "Data Structures Lab"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Kathleen Jensen, Niklaus Wirth and A. Mickel, Pascal User Manual and Report: Iso Pascal Standard, Springer Verlag, 4th Edition, October 1991, Bruno R. Preiss, Data Structures and Algorithms with Object-Oriented Design Patterns in C++, Wiley , Sons (Asia), 2001, Sartaj Sahni, Data Structures, Algorithms, and Applications in C++, WCB McGraw-Hill, International Edition, 1998, Michael Goodrich and Roberto Tamassia, Data Structures and Algorithms in Java, Second Edition, Wiley , Sons (Asia), 2001"
18 | TYPE = "Lab"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs747.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs747.aiml','w')
4 |
5 | COURSECODE = "747"
6 | PROFESSOR = "Shivaram Kalyanakrishnan"
7 | CREDITS = "6"
8 | SYLLABUS = "Agency, intelligence, and learning , Exploration and multi-armed bandits, Markov Decision Problems and planning, Reinforcement learning, Search, Multi-agent systems and multi-agent learning, Case studies"
9 | TITLE = "Foundations of Intelligent and Learning Agents"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Reinforcement Learning: An Introduction, Richard S. Sutton and Andrew G. Barto, MIT Press, 1998. [Chapters 1, 2, 3, 4, 6, 8, and 9], Dynamic Programming and Optimal Control, Volume II, Dimitri P. Bertsekas, 4th edition, Athena Scientific, 2012. [Chapter 2], Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems, Sebastien Bubeck and Nicolo Cesa-Bianchi, Foundations and Trends in Machine Learning, Volume 5, Number 1, 2012. [Chapters 2 and 3], Selected research papers"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~shivaram/teaching/cs747-a2015/"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs725.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs725.aiml','w')
4 |
5 | COURSECODE = "725"
6 | PROFESSOR = "Saketha Nath J"
7 | CREDITS = "6"
8 | SYLLABUS = "Remedial co-requisite: Mathematical foundations (Separately proposed by Prof. Saketh Nath), Recommended parallel courses: CS709 (Convex optimization), Course Content :, Supervised learning: decision trees, nearest neighbor classifiers, generative classifiers like naive Bayes, linear discriminate analysis, loss regularization framework for classification, Support vector Machines, Regression methods: least-square regression, kernel regression, regression trees, Unsupervised learning: k-means, hierarchical, EM, non-negative matrix factorization, rate distortion theory."
9 | TITLE = "Foundations of machine learning"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1. Hastie, Tibshirani, Friedman The elements of Statistical Learning Springer Verlag., 2. Pattern recognition and machine learning by Christopher Bishop., 3. Selected papers."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~sunita/cs725"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs224.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs224.aiml','w')
4 |
5 | COURSECODE = "224"
6 | PROFESSOR = "---"
7 | CREDITS = "0"
8 | SYLLABUS = "Design of Computer Networking protocols at all layers: transmission media, data link protocols, media access control, routing and congestion control, admission control, traffic shaping and policing, Internetworking (IP) and transport layer protocols (TCP). Performance analysis of networks."
9 | TITLE = "Computer Networks"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "W. Stallings, Data and Computer Communications, 6th edition, Prentice Hall,2000., A. S. Tanenbaum, Computer Networks, 4th edition, Prentice Hall, 2003., F. Halsall, Data Communications, Computer Networks and Open Systems, 4th edition, Addison-Wesley.Walrand and Varaiya, High Performance Communication Networks, Morgan Kaufmann, 1996., D. E. Comer, Internetworking with TCP/IP: Principles, Protocols, Architecture, 3rd edition, Prentice Hall.W. R. Stevens, TCP/IP Illustrated Vol. I, Addison Wesley, 1994."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs475.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs475.aiml','w')
4 |
5 | COURSECODE = "475"
6 | PROFESSOR = "Parag Chaudhuri"
7 | CREDITS = "6"
8 | SYLLABUS = "1. Rasterization of lines and circles, Clipping algorithms, 2. Synthetic Camera and Image formation models, 3. 2D and 3D transformations, 4. The Modelling-Viewing Pipeline, 5. Visibility, 6. Ray Tracing, 7. Shading and Illumination models, 8. Texture Mapping, 9. Curves and Surfaces, 10. Hierarchical Modelling, Animation"
9 | TITLE = "Computer Graphics"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1.Interactive Computer Graphics A topdown approach using OpenGL, 5th ed., Edward Angel, Pearson Education Low Price Indian Edition, 2008., 2.Computer Graphics using open GL, 3rd ed., F. S. Hill Jr. and S. M. Kelley, Pearson Education Low Price Indian Edition, 2006., 3.Computer Graphics with OpenGL, 3rd ed., D. D. Hearn and M. P. Baker, Pearson Education Low Price Indian Edition, 2003, 4.Fundamentals of Computer Graphics, 3rd ed., Peter Shirley, A K Peters, 2009"
18 | TYPE = "Theory+Project"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~paragc/teaching/2013/cs475"
21 | PREREQUISITES = "CS 213"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs675.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs675.aiml','w')
4 |
5 | COURSECODE = "675"
6 | PROFESSOR = "Parag Chaudhuri"
7 | CREDITS = "0"
8 | SYLLABUS = "1. Rasterization of lines and circles, Clipping algorithms, 2. Synthetic Camera and Image formation models, 3. 2D and 3D transformations, 4. The Modelling-Viewing Pipeline, 5. Visibility, 6. Ray Tracing, 7. Shading and Illumination models, 8. Texture Mapping, 9. Curves and Surfaces, 10. Hierarchical Modelling, Animation."
9 | TITLE = "Computer Graphics"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1.Interactive Computer Graphics A topdown approach using OpenGL, 5th ed., Edward Angel, Pearson Education Low Price Indian Edition, 2008., 2.Computer Graphics using open GL, 3rd ed., F. S. Hill Jr. and S. M. Kelley, Pearson Education Low Price Indian Edition, 2006., 3.Computer Graphics with OpenGL, 3rd ed., D. D. Hearn and M. P. Baker, Pearson Education Low Price Indian Edition, 2003., 4.Fundamentals of Computer Graphics, 3rd ed., Peter Shirley, A K Peters, 2009."
18 | TYPE = "Theory+Project"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~paragc/teaching/2013/cs675"
21 | PREREQUISITES = "None"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_syllabus:
--------------------------------------------------------------------------------
1 | What are the contents of CS344?
2 | What is the syllabus for CS344?
3 | What contents is covered by CS344?
4 | What syllabus is covered by CS344?
5 | What is the curriculum of CS344?
6 | What is the outline of CS344?
7 | What things are covered by CS344?
8 | What things are included in CS344?
9 | What are the contents of CS 344?
10 | What is the syllabus for CS 344?
11 | What contents is covered by CS 344?
12 | What syllabus is covered by CS 344?
13 | What is the curriculum of CS 344?
14 | What is the outline of CS 344?
15 | What things are covered by CS 344?
16 | What things are included in CS 344?
17 | What will I learn in CS344?
18 | How enlightened I will be after completing CS344?
19 | What will the professor teach me in CS344?
20 | What is the professor going to teach in CS344?
21 | What is the instructor going to teach in CS344?
22 | What is the teacher going to teach in CS344?
23 | What will be the syllabus of CS344?
24 | CS344 syllabus?
25 | syllabus CS344?
26 | What will I get to learn in CS344?
27 | What should I study for CS344?
28 | What will I study for CS344?
29 | What can I study for CS344?
30 | What to study for CS344?
31 | CS344 study?
32 | study cs344?
33 | What to expect from CS344?
34 | What is the professor expecting to teach in CS344?
35 | What is the course plan of CS344?
36 | Can you tell me what the professor will teach in CS344?
37 | curriculum cs344?
38 | cs344 curriculum?
39 | outline cs344?
40 | cs344 outline?
41 | scope cs344?
42 | cs344 scope?
43 | What is the scope of cs344?
44 | What is the course content of CS344?
45 | What is the course syllabus of CS344?
46 | What is the course curriculum of CS344?
47 |
--------------------------------------------------------------------------------
/scripts/data/cs618.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs618.aiml','w')
4 |
5 | COURSECODE = "618"
6 | PROFESSOR = "Uday Khedkar"
7 | CREDITS = "6"
8 | SYLLABUS = "The course consists of the following modules: (1) Introduction to program analysis and data flow analysis, (2) Bit vector data flow frameworks: live variables analysis, available expressions analysis, reaching definitions analysis, anticipable expressions analysis, partial redundancy elimination, (3) Mathematical abstractions in data flow analysis: lattice theory, characterizing data flow values and flow functions, algorithms for data flow analysis, complexity of data flow analysis. (4) General data flow frameworks: constant propagation, strongly live variables analysis, may and must pointer analysis, liveness analysis of heap data, (5) Interprocedural data flow analysis: Functional method, call strings method, call strings method using value contexts."
9 | TITLE = "Program Analysis"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Uday P. Khedker, Amitabha Sanyal, Bageshri Karkare. Data flow analysis: Theory and Practice. CRC Press (Taylor and Francis Group), 2009 (Book Page: http://www.cse.iiitnr.ac.in/~uday/dfaBook-web)"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~uday/courses/cs618-15"
21 | PREREQUISITES = "Nil"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs663.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs663.aiml','w')
4 |
5 | COURSECODE = "663"
6 | PROFESSOR = "Suyash Awate / Ajit Rajwade"
7 | CREDITS = "6"
8 | SYLLABUS = "*Image enchancement: histogram equalization and specification, contrast modification, neighborhood filtering, image smoothing and image sharpening., *Frequency domain processing: Sampling theorem, Fourier transforms and their properties, applications in image filtering, *Edge detection, * Principal components analysis: applications in face recognition [eigenfaces], and denoising (later), * Image restoration: denoising, deblurring, * Image segmentation: region-based methods, template matching, Hough transform, Mean shift, active contours (snakes), * Color models, filtering of color images, * Image compression: JPEG, wavelet representation for images, * Tomography, radon Transform, projection theorem, image reconstruction from back-projections, * Statistics of natural images (time permitting), Morphological image processing (time permitting), Sparse representations and non-local similarity (time permitting), introduction to compressive sensing (time, permitting)"
9 | TITLE = "Digital Image Processing"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "N/A"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~ajitvr/CS663/"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/aiml/standard/continuation.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | CONTINUATION *
13 | Blank template
14 |
15 | CONTINUATION
16 | RANDOM TOPIC
17 |
18 |
19 |
--------------------------------------------------------------------------------
/scripts/data/cs682.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs682.aiml','w')
4 |
5 | COURSECODE = "682"
6 | PROFESSOR = "Siva Kumar G."
7 | CREDITS = "6"
8 | SYLLABUS = "Software life cycle -- important steps and effort distribution. Aspects of estimation and scheduling. Software evaluation techniques-modular design : coupling and cohesion, Software and complexity measures. Issues in software reliability. System Analysis: Requirement analysis. Specification languages. Feasibility analysis. File and data structure design, Systems analysis tools. Software design methodologies, Data flow and Data Structure oriented design strategies. Software development, coding, verification, and integration. Issues in project management-team structure, scheduling, software quality assurance. Object Oriented methodology: object orineted paradigm, OO analysis and design, examples of methodolgies."
9 | TITLE = "Software Engineering"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "R. S. Pressman, Software Engineering - A Practioners Approach,3rd Edition, McGrawHill,1992. J. Martin, Rapid Application Development, Maxwell MacMillan, 1991. B. Meyer, Object Oriented Software Construction, Prentice Hall, 1988. G. G. Schulmeyer, Zero Defect Software, McGraw-Hill, 1992. J. Rumbaugh et. al., Object Oriented Modeling and Design, Prentice Hall,1991."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~cs682/"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs101.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs101.aiml','w')
4 |
5 | COURSECODE = "101"
6 | PROFESSOR = "Varsh Apte"
7 | CREDITS = "6"
8 | SYLLABUS = "This course provides an introduction to problem solving with computers using a modern language such as Java or C/C++. Topics covered will include :, * Utilization : Developer fundamentals such as editor, integrated programming environment, Unix shell, modules, libraries., * Programming features : Machine representation, primitive types,arrays and records, objects, expressions, control statements, iteration,procedures, functions, and basic i/o., * Applications : Sample problems in engineering, science, text processing, and numerical methods."
9 | TITLE = "Computer Programming and Utilization"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Textbook, * C++ Program Design: An introduction to Programming and Object-Oriented Design, 3rd Edition, by Cohoon and Davidson, Tata McGraw Hill. 2003. , Other references (Not required reading), * Thinking in C++ 2nd Edition by Bruce Eckel(available online), * G. Dromey, How to Solve It by Computer, Prentice-Hall, Inc., Upper Saddle River, NJ, 1982., * Polya, G., How to Solve _It (2nd ed.), Doubleday and co. (1957)., * Let Us C. Yashwant Kanetkar. Allied Publishers, 1998., * The Java Tutorial, Sun Microsystems. Addison-Wesley, 1999."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~cs101"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs683.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs683.aiml','w')
4 |
5 | COURSECODE = "683"
6 | PROFESSOR = "Virendra Singh"
7 | CREDITS = "6"
8 | SYLLABUS = "Introduction to High Performance Computing: Overview, Pipeline vs Parallel Processing Parallel Architectures : Classification and Performance. Pipeline Processing : Pipeline Performance, design of arithmetic pipelines, multifiction pipes, concept of reservation table, collision vector and hazards. Instruction Processing Pipes: Instruction and data hazard, hazard detection and resolution, delayed jumps, delayed execution. RISC Philosophy. Pipeline scheduling Theory: Greedy pipeline scheduling algorithm, state diagram, modified state diagram, Latency cycles, Optimal cycles, scheduling of static , dynamic Pipelines. Implementation of pipeline schedulers Interconnection Networks : Interconnection network classification, Single stage/ Multistage Networks, crossbars, clos Networks, Benes Networks , Routing algorithms. Omega, Cub-connected and other networks. Introduction to Neurocomputing Architectures Topics from the current literature as self study and presentations by students."
9 | TITLE = "Advanced Computer Architecture"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "M. R. Bhujade, Parallel Computing, Newage International Pvt. Ltd., 1995. Stallings, William, Computer organization and architecture, designing for performance, Prentice Hall of India, 1997 J. L. Hennessy and D. A. Patterson, Computer architecture : a quantitative approach, Harcourt Asia, Singapore 1996"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~mrb"
21 | PREREQUISITES = "NIL"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs616.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs616.aiml','w')
4 |
5 | COURSECODE = "616"
6 | PROFESSOR = "Supratim Biswas"
7 | CREDITS = "6"
8 | SYLLABUS = "Parallelizing Compilers - motivation and overview, structure of a parallelizing compiler; review of code optimization techniques in compilers for sequential machines. Parallelism detection - data dependence, direction vectors, loop carried and loop independent dependences; tests for data dependence and their applicability, construction of data dependence graph. Control dependence and control dependence graph. Restructuring transformations and automatic extraction of parallelism; representation of iteration spaces of multiply nested loops; loop based transformations such as loop distribution, loop coalescing, loop inter-change and cycle shrinking transformation. Introduction to machine models and associated algorithms for parallel code generation and task graph construction. Interprocedural analysis - aliasing information, summary data flow analysis, interprocedural constant propagation, interprocedural data dependence analysis and parallelisation of call statements. Partitioning and Scheduling of a task graph; models for communication, partitioning and scheduling algorithms, dynamic scheduling algorithms, target code generation. Case studies of contemporary parallelising compiler efforts."
9 | TITLE = "Parallelizing Compilers"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "M. J. Wolfe, Optimizing Supercompilers for supercomputers ,MIT Press, 1989. V. Sarkar, Partitioning and Scheduling Parallel Programs for Execution on Multiprocessors, MIT Press, 1989. U. Banerjee, Dependence Analysis for Supercomputing, Norwell, Kluwer Academic Publishers, 1988."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~cs616/"
21 | PREREQUISITES = "UG com"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/general/test.py:
--------------------------------------------------------------------------------
1 | import nltk
2 | import re
3 | from nltk.corpus import stopwords
4 | from nltk.tokenize import word_tokenize
5 | from nltk.stem import WordNetLemmatizer
6 | from nltk.corpus import wordnet as wn
7 |
8 | def course_code(sentence):
9 | try:
10 | words = re.compile('\w+').findall(sentence)
11 | new_sentence = ""
12 | for index, word in enumerate(words):
13 | if (word == "cs") and (index < len(words)-1) and (words[index+1].isdigit()):
14 | new_sentence = new_sentence + word
15 | else:
16 | new_sentence = new_sentence + word + " "
17 | return new_sentence
18 | except:
19 | return sentence
20 |
21 | #http://pythonprogramming.net/part-of-speech-tagging-nltk-tutorial/?completed=/stemming-nltk-tutorial/
22 | dict = {'NN': 'NOUN', 'JJ': 'ADJ'}
23 | dict['NNS'] = 'NOUN'
24 | dict['NNP'] = 'NOUN'
25 | dict['NNPS'] = 'NOUN'
26 | dict['PRP'] = 'NOUN'
27 | dict['PRP$'] = 'NOUN'
28 | dict['RB'] = 'ADV'
29 | dict['RBR'] = 'ADV'
30 | dict['RBS'] = 'ADV'
31 | dict['VB'] = 'VERB'
32 | dict['VBD'] = 'VERB'
33 | dict['VBG'] = 'VERB'
34 | dict['VBN'] = 'VERB'
35 | dict['VBP'] = 'VERB'
36 | dict['VBZ'] = 'VERB'
37 | dict['WRB'] = 'ADV'
38 |
39 | # pos tag -> morphy -> synset
40 | # Morphy take NOUN,VERB,ADV,ADJ
41 | while True:
42 | sentence = raw_input(">> ")
43 | sentence = sentence.lower()
44 | sentence = course_code(sentence)
45 | stop_words = set(stopwords.words('english'))
46 | word_tokens = word_tokenize(sentence)
47 |
48 | filtered_sentence = [w for w in word_tokens if not w in stop_words]
49 | print filtered_sentence
50 | temp = nltk.pos_tag(filtered_sentence)
51 |
52 | new_sentence = ""
53 | for i in temp:
54 | try:
55 | k = i[1]
56 | if (dict[k] != None):
57 | part_speech = dict[k]
58 | else:
59 | part_speech = 'NOUN'
60 |
61 | if(part_speech == 'NOUN'):
62 | word = wn.morphy(i[0],wn.NOUN)
63 | elif(part_speech == 'VERB'):
64 | word = wn.morphy(i[0],wn.VERB)
65 | elif(part_speech == 'ADV'):
66 | word = wn.morphy(i[0],wn.ADV)
67 | elif(part_speech == 'ADJ'):
68 | word = wn.morphy(i[0],wn.ADJ)
69 | word1 = wn.synsets(word)[0].lemmas()[0].name()
70 | except:
71 | word1 = i[0]
72 | new_sentence = new_sentence+" "+word1.lower()
73 | print type(new_sentence)
74 | print new_sentence
--------------------------------------------------------------------------------
/scripts/data/cs684.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs684.aiml','w')
4 |
5 | COURSECODE = "684"
6 | PROFESSOR = "Krithi Ramamritham"
7 | CREDITS = "6"
8 | SYLLABUS = "Introduction to Embedded systems, hardware/software codesign, Embedded micro controller cores, embedded memories, Examples of embedded systems, sensors and interfacing techniques, Real-time concepts, real-time operating systems, Required RTOS services/capabilities (in contrast with traditional OS)., Resource Management/scheduling paradigms: static priorities, static schedules, dynamic scheduling, best effort current best practice in scheduling (e.g. Rate Monotonic vs. static schedules), Real-world issues: blocking, unpredictability, interrupts, caching, Examples of OSs for embedded systems - RT Linux, VRTX., Programming languages for embedded systems e.g., Handel-C and Esterel, system support for embedded systems, selected embedded system-based applications: process-control, robotics, etc. Software Development Methodology: Model based development, Statecharts, etc. Case studies, Controlling an Injection molding process, Flight simulator, digital call center handler, codec."
9 | TITLE = "Embedded Systems"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Jack Ganssle, The Art of Designing Embedded Systems, Newnes, 1999., David Simon, An Embedded Software Primer, Addison Wesley, 2000., RTS: Real-Time Systems, by C.M. Krishna and Kang G. Shin, McGraw-Hill, 1997, ISBN 0-07-057043., J. A. Stankovic and K. Ramamritham, Advances in Hard Real-Time Systems, IEEE Computer Society Press, Washington DC, September 1993, 777 pages.Selected papers and references"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "EE-712 (Embedded Systems) esp. for those wanting to do MTP in the area - else this may be seen as standalone course also)."
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs613.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs613.aiml','w')
4 |
5 | COURSECODE = "613"
6 | PROFESSOR = "Sanyal Amitabha"
7 | CREDITS = "6"
8 | SYLLABUS = "Illustration of Basic concepts in FP using Haskell: Functions as first class objects, Laziness, Datatypes and pattern matching, Types, Classes and overloading, Side-effect free IO. Introduction to Lambda Calculus: Syntax of Lambda terms, Alpha, beta and delta conversions, Normal forms, applicative order and normal order reductions, Church-Rosser theorems, Y combinator and recursion. , Type Inference: Hindley-Milner type checking algorithm and its extension to handle type classes. Implementation of FP Languages: Supercombinators and Lambda Lifting, Graph reduction, Three instruction machine (TIM). Selected topics in Functional Programming: Bird-Meertens Formalism, Abstract Interpretation, Functional Programming using Monads. Selected topics in Functional Programming: Bird-Meertens Formalism, Abstract Interpretation, Functional Programming using Monads."
9 | TITLE = "Design , Implementation of Functional Programming"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "P. Hudak, S. Peyton Jones and P. Wadler (eds), Report on the Programming Language Haskell, A Non-strict Purely Functional Language (v 1.2), ACM SIGPLAN Notices, 21(12):37-79, December 1986. , P. Hudak and J. Fasel. A Gentle Introduction to Haskell. ACM SIGPLAN Notices, 21(12):37-79, December 1986. , R. Bird and P. Wadler. Introduction to Functional Programming, Prentice Hall, New York, 1988. , J. R. Hindley and J. P. Seldin. Introduction to Lambda Calculus and Combinators. Cambridge University Press, 1984. , S. Peyton Jones. The Implementation of Functional Programming languages, Prentice Hall, New York, 1987. , G. Argo, Improving the Three Instruction Machine, Procs. of FPCA, ACM Press, 1989."
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~as/fpcourse/fpcourse.html"
21 | PREREQUISITES = "NIL"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/scripts/data/cs740.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs740.aiml','w')
4 |
5 | COURSECODE = "740"
6 | PROFESSOR = "Sharat Chandran"
7 | CREDITS = "6"
8 | SYLLABUS = "The syllabus includes a subset of topics from the following list:, 1) Multivariate Calculus, * Functions (multi-variable, vector-valued) and their derivatives, Taylor series, matrix calculus, basic vector calculus, 2) Numerical Linear Algebra, * Special matrices (e.g., orthogonal, SPD), matrix decompositions (e.g., SVD, eigen analysis), 3) Probability and Statistics, * Distributions, mean, variance, covariance, bounds, likelihood function, Bayes rule, entropy, divergence, mutual information, 4) Optimization, * Unconstrained (gradient descent, Newton's method, Levenberg-Marquardt algorithm, quasi-Newton methods), constrained (equality constraints, Lagrange multipliers), 5) Interpolation and regression, * Linear, polynomial, Barycentric coordinates, 6) Numerical integration of functions and introductory numerical differential equations, 7) Introductory differential geometry, 8) Introductory projective geometry"
9 | TITLE = "Mathematics for Visual Computing"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "1., Title: Numerical Recipes - The Art of Scientific Computing, Authors: William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery, Cambridge University Press 2007, 2., Title: Scientific Computing, Author: Michael T. Heath, McGraw-Hill 2002, 3., Title: Numerical Linear Algebra, Authors: Lloyd N. Trefethen, David Bau III, SIAM 1997, 4., Title: A First Course in Probability, Author: Sheldon Ross, Pearson Education 2012, 5., Title: Probability, Random Variables and Stochastic Processes, Authors: Athanasios Papoulis, S. Unnikrishna Pillai, McGraw-Hill 2002, 6., Title: Numerical Optimization, Authors: Jorge Nocedal, Stephen Wright, Springer 2006, 7., Title: Elements of Information Theory, Authors: Thomas M. Cover, Joy A. Thomas, Wiley-Interscience 2006"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~sharat/current/cs740"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/aiml/standard/std-startup.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LOAD AIML B
6 |
7 | aiml/standard/std-pickup.aiml
8 | aiml/standard/reduction0.safe.aiml
9 | aiml/standard/reduction1.safe.aiml
10 | aiml/standard/reduction2.safe.aiml
11 | aiml/standard/reduction3.safe.aiml
12 | aiml/standard/reduction4.safe.aiml
13 | aiml/standard/reduction.names.aiml
14 | aiml/standard/mp0.aiml
15 | aiml/standard/mp1.aiml
16 | aiml/standard/mp2.aiml
17 | aiml/standard/mp3.aiml
18 | aiml/standard/mp4.aiml
19 | aiml/standard/mp5.aiml
20 | aiml/standard/mp6.aiml
21 | aiml/standard/reductions-update.aiml
22 | aiml/standard/ai.aiml
23 | aiml/standard/alice.aiml
24 | aiml/standard/atomic.aiml
25 | aiml/standard/badanswer.aiml
26 | aiml/standard/biography.aiml
27 | aiml/standard/bot.aiml
28 | aiml/standard/bot_profile.aiml
29 | aiml/standard/client.aiml
30 | aiml/standard/client_profile.aiml
31 | aiml/standard/computers.aiml
32 | aiml/standard/continuation.aiml
33 | aiml/standard/date.aiml
34 | aiml/standard/default.aiml
35 | aiml/standard/emotion.aiml
36 | aiml/standard/imponderables.aiml
37 | aiml/standard/inquiry.aiml
38 | aiml/standard/interjection.aiml
39 | aiml/standard/iu.aiml
40 | aiml/standard/knowledge.aiml
41 | aiml/standard/loebner10.aiml
42 | aiml/standard/numbers.aiml
43 | aiml/standard/personality.aiml
44 | aiml/standard/pickup.aiml
45 | aiml/standard/primitive-math.aiml
46 | aiml/standard/psychology.aiml
47 | aiml/standard/salutations.aiml
48 | aiml/standard/stack.aiml
49 | aiml/standard/std-startup.xml
50 | aiml/standard/that.aiml
51 | aiml/standard/wallace.aiml
52 | aiml/standard/xfind.aiml
53 | aiml/standard/update1.aiml
54 | aiml/standard/update_mccormick.aiml
55 | aiml/dept/*.aiml
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/scripts/data/cs745.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs745.aiml','w')
4 |
5 | COURSECODE = "745"
6 | PROFESSOR = "R K. Shyamasundar"
7 | CREDITS = "6"
8 | SYLLABUS = "Access Control: Mandatory Access Control, Discrete Access Control, Principles of Least Privilege, Distributed Access Control , Role based Access, Attribute Based Access, Key Management, SPKI/SDSI, Concepts of Security: Confidentiality, Containment, isolation, Privacy, Anonymity, pseudo-anonymity etc., Policy specification, User authentication, Session management, multi-level security, multi-lateral security, Security Mechanisms: Protection, Confinement, Isolation, Virtual machines, Non-interference Dealing with legacy code, Sandboxes, Separability, Data caging, OS Security: Principles, Case studies of Operating Systems, secure OS like SELINUX, Run-Time Monitoring: Security Automata, Edit Automata, Shallow Automata,, Malware analysis and Counter measures: difficulties, approaches, defense against untrusted code, Security Models for Information Systems: Bell-LaPadula, Biba, Clark-Wilson, Lattice Model, Chinese Wall Model, Information Flow Models: Distributed Information Control, Secure OS based on IFC, Conference management systems like EasyChair, HotCrp, Language based security: Program analysis for Security, secure code practices and tools for secure code writing, Protocol Specification and Verification: Principles, Cryptographic protocols, protocol specification language characteristics., Web security models, application security, Browser Security, Information flow browsers, Special Topics: Mobile phone security, Android Security, Cloud security, Security of Internet of Things (IoT)"
9 | TITLE = "Principles of Data and System Security"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Chapters from classic books like, Ross Anderson, Security Engineering, 2nd Edition, Wiley publishers, 2008, Morrie Gasser, Building a Secure Computer System,Von Nostrand Reinhold,1988, Matt Bishop, Computer Security Art and Science, Addison Wesley, 2003, Dorothy Denning, Cryptography and Data Security, Addison Wesley, 1982"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "www.cse.iiitnr.ac.in/~cs745"
21 | PREREQUISITES = "N/A"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/aiml/standard/stack.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | SHOW STACK
13 | top=" " second=" " third=" " fourth=" " fifth=" " sixth=" " seventh=" " last=" "
14 |
15 | POP
16 | POPOM
17 |
18 | POPOM OM
19 | RANDOM TOPIC
20 |
21 | POPOM *
22 | RANDOM TOPIC
23 |
24 | RANDOM TOPIC
25 |
Your Chinese animal sign
Your home town
Your favorite color
Your star sign
Your rising sign
My favorite movie
Your personality
Your good looks
Your favorite band
Your problems
Your home town
Your favorite color
Your star sign
Your rising sign
You favorite movie
My favorite movie
Your personality
Your good looks
Your favorite band
Your problems
26 |
27 | PUSH *
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/scripts/data/cs615.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs615.aiml','w')
4 |
5 | COURSECODE = "615"
6 | PROFESSOR = "Supratik Chakraborty"
7 | CREDITS = "6"
8 | SYLLABUS = "Reasoning about sequential programs:, Programs as (possibly infinite) state transition systems; specifying program correctness using pre- and post-conditions; partial and total correctness semantics; Hoare logic and its rules for a simple imperative sequential language; weakest pre-condition and strongest post-condition semantics; central importance of invariants in program verification., Brief introduction to lattices and the theory of abstract interpretation; some numerical abstract domains: intervals, difference bound matrices, octagons, polyhedra; computing abstract post-conditions and abstract loop invariants; refining abstractions and counterexample-guided abstraction refinement, Predicate abstraction and boolean programs; converting assertion to a location reachability problem; location reachability using predicate abstraction for simple programs and for programs with (possibly recursive) function calls; discovering predicates using counterexample-guided abstraction refinement, Program verification as a constraint solving problem; checking properties of bounded and unbounded executions of programs using constraint solving, Shape analysis: use of separation logic and three-valued logic, Reasoning about reactive systems:, Introduction to temporal logics: LTL and CTL; Kripke structures as models of reactive (hardware and software) systems; LTL and CTL model checking algorithms and some applications, properties. Computer-Aided Verification: Deductive and model-theoretic approach. Automatic verification of finite state systems. Case study of languages and systems like Z, B, spin, PVS, step."
9 | TITLE = "Formal Specification and Verification of Programs"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "Logic in Computer Science: Modeling and Reasoning about Systems, M. Huth and M. Ryan, Cambridge University Press, 2004, Chapter 15, Methods and Logics for Proving Programs by P. Cousot, in Handbook of Theoretical Computer Science, Vol B (Formal Models and Semantics), edited by Jan Van Leeuwen, The MIT Press, 1994, Research papers and survey articles to be announced in class"
18 | TYPE = "Theory"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://www.cse.iiitnr.ac.in/~supratik/courses/cs615/"
21 | PREREQUISITES = "NIL"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/aiml/standard/reductions-update.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | * YOU KNOW
13 | YOU KNOW
14 |
15 | * I THOUGHT
16 | I THOUGHT
17 |
18 |
19 | MY _ S NAME IS *
20 | MY IS CALLED
21 |
22 | MY _ IS NAMED *
23 | MY IS CALLED
24 |
25 |
26 | SNOW IN THE FORECAST
27 | WEATHER
28 |
29 |
30 | INTERESTED IN *
31 | ARE YOU INTERESTED IN
32 |
33 |
34 | CALL * PHONE
35 | CALL
36 |
37 |
38 | CALL * CALL *
39 | CALL
40 |
41 |
42 | I AM IN * I AM IN *
43 | I AM IN
44 |
45 |
46 | I AM * YEARS OLD I *
47 | I AM YEARS OLD
48 | I
49 |
50 | WHAT DO YOU MEAN * O M
51 | WHAT IS OM
52 |
53 |
54 | HOW OLD IS THAT MAKE YOU
55 | AGE
56 |
57 |
58 | WHO IS MY *
59 | MY
60 |
61 |
62 | _ FOR ME
63 | FOR ME
64 |
65 |
66 | XDMOZ *
67 | XFIND
68 |
69 | GOOGLE *
70 | XFIND
71 |
72 | ACCESS *
73 | XFIND
74 |
75 | XGOOGLE *
76 | XFIND
77 |
78 | TO CALL *
79 | CALL
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/aiml/standard/interjection.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | INTERJECTION
13 |
OK.
Ah.
Er.
So?
Uh.
Aw.
Oh.
Aha.
Hey.
Gee.
Hmm.
Mmm.
Yay.
Ugh.
Woe!
Wow!
And?
Dude!
Gosh!
Ahem.
Whoa.
Ayuh.
Dude!
Yikes!
Great.
I see.
Really.
Blimey.
Yippee!
Groovy.
Hurrah!
Awesome.
Come on.
Far out.
Right on.
Oh really.
Excuse me!
Pardon me?
I hear you.
That's cool.
Alright then.
Take it easy.
I understand.
Tell me more.
It's all good.
Next question?
That's alright.
Give me a break.
Are you kidding?
Yeah that's right.
That's interesting.
How can I help you?
""? ?
I don't judge people.
It goes without saying.
I hate one word answers.
OK.
Ah.
Er.
So?
Uh.
Aw.
Oh.
Aha.
Hey.
Gee.
Hmm.
Mmm.
Yay.
Ugh.
Woe!
Wow!
And?
Dude!
Gosh!
Ahem.
Whoa.
Ayuh.
Dude!
Yikes!
Great.
I see.
Really.
Blimey.
Yippee!
Groovy.
Hurrah!
Awesome.
Come on.
Far out.
Right on.
Excuse me!
Pardon me?
I hear you.
That's cool.
Alright then.
Take it easy.
I understand.
Tell me more.
It's all good.
Next question?
That's alright.
Give me a break.
Are you kidding?
Yeah that's right.
That's interesting.
How can I help you?
""? ?
I don't judge people.
It goes without saying.
Are you shy?
14 |
15 |
16 |
--------------------------------------------------------------------------------
/scripts/generate_shell.py:
--------------------------------------------------------------------------------
1 | import sys
2 |
3 | g = open('template_course.txt','w')
4 |
5 | course_list = ["cs101","cs207","cs213","cs215","cs218","cs224","cs251","cs293","cs317","cs341","cs386","cs387","cs475","cs601","cs606","cs613","cs615","cs616","cs618","cs620","cs631","cs641","cs663","cs675","cs682","cs683","cs684","cs691","cs692","cs721","cs725","cs738","cs740","cs745","cs747"]
6 |
7 |
8 | #--------------------------------------------------------------
9 | # cd ./reduced/
10 | # sed -i 's/344/305/g' reduced_prof
11 | # sed -i 's/344/305/g' reduced_title
12 | # sed -i 's/344/305/g' reduced_credits
13 | # sed -i 's/344/305/g' reduced_syllabus
14 | # sed -i 's/344/305/g' reduced_studentstrength
15 | # sed -i 's/344/305/g' reduced_venue
16 | # sed -i 's/344/305/g' reduced_gradeAP
17 | # sed -i 's/344/305/g' reduced_gradeAA
18 | # sed -i 's/344/305/g' reduced_gradeAB
19 | # sed -i 's/344/305/g' reduced_gradeBB
20 | # sed -i 's/344/305/g' reduced_gradeBC
21 | # sed -i 's/344/305/g' reduced_gradeCC
22 | # sed -i 's/344/305/g' reduced_gradeCD
23 | # sed -i 's/344/305/g' reduced_gradeDD
24 | # sed -i 's/344/305/g' reduced_gradeDX
25 | # sed -i 's/344/305/g' reduced_gradeFR
26 | # sed -i 's/344/305/g' reduced_grades
27 | # sed -i 's/344/305/g' reduced_type
28 | # sed -i 's/344/305/g' reduced_duration
29 | # sed -i 's/344/305/g' reduced_prerequisites
30 | # sed -i 's/344/305/g' reduced_references
31 | # sed -i 's/344/305/g' reduced_homepage
32 |
33 | # cd ../
34 | # python replace.py ./data/cs305.txt
35 | # python cpy_aiml.py
36 | # rm -f cpy_aiml.py
37 | # mv cs305.aiml ./cs305/
38 | # cp ./cs305/cs305.aiml ../aiml/dept/cs305.aiml
39 |
40 | #--------------------------------------------------------------
41 | s = ""
42 | s = s+"#--------------------------------------------------------------\n"
43 | s = s+"cd ./reduced/"+"\n"
44 | s = s+"sed -i 's/344/305/g' reduced_prof"+"\n"
45 | s = s+"sed -i 's/344/305/g' reduced_title"+"\n"
46 | s = s+"sed -i 's/344/305/g' reduced_credits"+"\n"
47 | s = s+"sed -i 's/344/305/g' reduced_syllabus"+"\n"
48 | s = s+"sed -i 's/344/305/g' reduced_studentstrength"+"\n"
49 | s = s+"sed -i 's/344/305/g' reduced_venue"+"\n"
50 | s = s+"sed -i 's/344/305/g' reduced_gradeAP"+"\n"
51 | s = s+"sed -i 's/344/305/g' reduced_gradeAA"+"\n"
52 | s = s+"sed -i 's/344/305/g' reduced_gradeAB"+"\n"
53 | s = s+"sed -i 's/344/305/g' reduced_gradeBB"+"\n"
54 | s = s+"sed -i 's/344/305/g' reduced_gradeBC"+"\n"
55 | s = s+"sed -i 's/344/305/g' reduced_gradeCC"+"\n"
56 | s = s+"sed -i 's/344/305/g' reduced_gradeCD"+"\n"
57 | s = s+"sed -i 's/344/305/g' reduced_gradeDD"+"\n"
58 | s = s+"sed -i 's/344/305/g' reduced_gradeDX"+"\n"
59 | s = s+"sed -i 's/344/305/g' reduced_gradeFR"+"\n"
60 | s = s+"sed -i 's/344/305/g' reduced_grades"+"\n"
61 | s = s+"sed -i 's/344/305/g' reduced_type"+"\n"
62 | s = s+"sed -i 's/344/305/g' reduced_duration"+"\n"
63 | s = s+"sed -i 's/344/305/g' reduced_prerequisites"+"\n"
64 | s = s+"sed -i 's/344/305/g' reduced_references"+"\n"
65 | s = s+"sed -i 's/344/305/g' reduced_homepage"+"\n"
66 | s = s+"\n"
67 | s = s+"cd ../"+"\n"
68 | s = s+"python replace.py ./data/cs305.txt"+"\n"
69 | s = s+"python cpy_aiml.py"+"\n"
70 | s = s+"rm -f cpy_aiml.py"+"\n"
71 | s = s+"mv cs305.aiml ./cs305/"+"\n"
72 | s = s+"cp ./cs305/cs305.aiml ../aiml/dept/cs305.aiml"+"\n"
73 | s = s+"\n"
74 | s = s+"#--------------------------------------------------------------\n"
75 |
76 | g.write(s)
77 | prev = "344"
78 | current = "305"
79 |
80 | for course in course_list:
81 | course_num = course[2:]
82 | s = s.replace(current,course_num)
83 | s = s.replace(prev,current)
84 | prev = current
85 | current = course_num
86 | g.write(s)
87 |
--------------------------------------------------------------------------------
/scripts/data/cs738.txt:
--------------------------------------------------------------------------------
1 | import re
2 | #-----------------------------------------------------------------------------------
3 | g = open('cs738.aiml','w')
4 |
5 | COURSECODE = "738"
6 | PROFESSOR = "Krishna S."
7 | CREDITS = "6"
8 | SYLLABUS = "(a) System Validation, - A high level over view of the purpose of system validation, simulation, testing, formal verification, model checking, automated theorem proving, (b) Model checking propositional linear time temporal logic, - Syntax of PLTL, Axiomatization, extensions of PLTL, specifying properties in PLTL,, - Basic model checking scheme for PLTL, translation of PLTL formulae to labelled Buchi automata, - Model checking complexity of PLTL, - The model checker SPIN, (c) Model checking branching temporal logic, - Syntax of CTL, Expressiveness of CTL, CTL_ and PLTL, specifying properties in CTL,, - Model checking CTL, _fixed point theory based on posets, fixed point characterization of CTL formulae,, fairness conditions, - Model checking complexity of CTL, - The model checker NuSMV, (d) Model checking real time temporal logic, - Syntax of TCTL, TPTL. Specifying timeliness properties in TCTL and TPTL, - Clock equivalence : the key to model checking real time, - Model checking region graphs, - Model checking complexity of TCTL and TPTL, - The model checkers UPPAAL, KRONOS, (e) Model checking propositional modal logic (ML) and first order logic(FO), - Syntax of ML, model checking games for ML, - Algorithms for finite games, alternating algorithms, - Evaluation game for FO, the guarded fragment of FO (GFO), - Model theoretic and algorithmic properties of GFO, - Model checking complexity of ML, FO, GFO, - Advantages of game based approach to model checking, (f) Model checking _fixed point logics, - Parity games and _fixed point logics, - Model checking games for _fixed point logics, - Model checking complexity of _fixed point logics, (g) Model checking probabilistic computation tree logic (PCTL), - Probabilistic systems, syntax of PCTL, PCTL model checking, the qualitative fragment of PCTL, - PCTL* and probabilistic bisimulation, - Markov decision processes, linear time properties and PCTL*, - The model checker PRISM"
9 | TITLE = "Concepts, Algorithms and Tools for Model-Checking"
10 | STUDENTSTRENGTH = "0"
11 | VENUE = "N/A"
12 | VENUE1 = "N/A"
13 | TIMESLOT = "N/A"
14 | #for AP,AA,AB,BB,BC,CC,CD,DD,DX,FR
15 | GRADES = ["0","0","0","0","0","0","0","0","0","0"]
16 | grade_index = {'AP':0,'AA':0,'AB':0,'BB':0,'BC':0,'CC':0,'CD':0,'DD':0,'DX':0,'FR':0}
17 | REFERENCES = "- Dexter Kozen. Automata and Computability, Springer, 1997., - Mike Sipser. Introduction to the Theory of Computation, PWS Publishing Company, 1997., - Christel Baier and Joost-Pieter Katoen. Principles of Model Checking,MIT Press, 2008., - Erich Gradel, Wolfgang Thomas, Thomas Wilke. Automata, logics, and in, nite games: a guide to current, research. LNCS, Springer-Verlag., - Marta Kwiatkowska, Gethin Norman and David Parker Stochastic Model Checking. In M. Bernardo and J. , Hillston (editors) Formal Methods for the Design of Computer, Communication and Software Systems: , Performance Evaluation (SFM'07), volume 4486 of Lecture Notes in Computer Science (Tutorial Volume),, pages 220-270, Springer, June 2007., - Vojtch Forejt, Marta Kwiatkowska, Gethin Norman and David Parker. Automated Veri, cation Techniques for, Probabilistic Systems. In M. Bernardo and V. Issarny (editors) Formal Methods for Eternal Networked , Software Systems (SFM'11), volume 6659 of LNCS, pages 53-113, Springer. June 2011."
18 | TYPE = "Project"
19 | DURATION = "Full Semester"
20 | HOMEPAGE = "http://moodle.iiitnr.ac.in/course"
21 | PREREQUISITES = "Good undergraduate background (atleast BB) in Automata and Logic (CS 208)"
22 | #-----------------------------------------------------------------------------------
23 |
--------------------------------------------------------------------------------
/aiml/standard/xfind.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | XFIND *
13 |
14 |
15 |
Let me think about it.
16 |
Have you tried a web search?
17 |
I haven't heard of .
18 |
There might be more than one.
19 |
I need time to formulate the reply.
20 |
I'll ask around and get back to you.
21 |
I have to think about that one for a while.
22 |
I would look into the web for that knowledge.
23 |
Does it have anything to do with ?
24 |
Interesting question.
25 |
That's a good question.
26 |
I'll come back to that later.
27 |
Is that a rhetorical question?
28 |
Do you use Explorer or another browser?
29 |
That's not something I get asked all the time.
30 |
I don't know anything about .
31 |
Check back later and see if I learn the answer to that one.
32 |
That's an interesting question. I'll come back to that in a minute.
33 |
You tell me.
34 |
What is it to you?
35 |
Are you testing me?
36 |
I will search for it.
37 |
I will try to find out.
38 |
I can ask someone about it.
39 |
I would do a search for it.
40 |
Would you like to know more?
41 |
Have you tried searching the web?
42 |
Do a web search for it.
43 |
Try searching the web.
44 |
I have never been asked that before.
45 |
I think you already know the answer.
46 |
Searching...Searching...Please stand by.
47 |
Let me think about it.
48 |
Have you tried a web search?
49 |
I haven't heard of .
50 |
There might be more than one.
51 |
I need time to formulate the reply.
52 |
I'll ask around and get back to you.
53 |
I have to process that one for a while.
54 |
I would look into the web for that knowledge.
55 |
Does it have anything to do with ?
56 |
Interesting question.
57 |
That's a good question.
58 |
I'll come back to that later.
59 |
Is that a rhetorical question?
60 |
That's not something I get asked all the time.
61 |
I don't know anything about .
62 |
Check back later and see if I learn the answer to that one.
63 |
That's an interesting question. I'll come back to that in a minute.
64 |
You tell me.
65 |
What is it to you?
66 |
Are you testing me?
67 |
I will search for it.
68 |
I can ask my .
69 |
I will try to find out.
70 |
I can ask someone about it.
71 |
I would do a search for it.
72 |
Would you like to know more?
73 |
Have you tried another program?
74 |
Ask Wikipedia about it.
75 |
What is your purpose in asking?
76 |
Try searching the Wikipedia.
77 |
Maybe my knows the answer.
78 |
I have never been asked that before.
79 |
I think you already know the answer.
80 |
Searching...Searching...Please stand by.
81 |
82 |
83 | PUSH
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/scripts/reduction.py:
--------------------------------------------------------------------------------
1 | import nltk
2 | from nltk.corpus import stopwords
3 | from nltk.tokenize import word_tokenize
4 | from nltk.stem import WordNetLemmatizer
5 | from nltk.corpus import wordnet as wn
6 | import re
7 |
8 | def course_code(sentence):
9 | try:
10 | words = re.compile('\w+').findall(sentence)
11 | new_sentence = ""
12 | for index, word in enumerate(words):
13 | if (word == "cs") and (index < len(words)-1) and (words[index+1].isdigit()):
14 | new_sentence = new_sentence + word
15 | else:
16 | new_sentence = new_sentence + word + " "
17 | return new_sentence
18 | except:
19 | return sentence
20 |
21 | def remove_aiml_char(sentence):
22 | try:
23 | new_sentence = sentence.replace("_","")
24 | new_sentence = new_sentence.replace("*","")
25 | return new_sentence
26 | except:
27 | return sentence
28 |
29 | dict = {'NN': 'NOUN', 'JJ': 'ADJ'}
30 | dict['NNS'] = 'NOUN'
31 | dict['NNP'] = 'NOUN'
32 | dict['NNPS'] = 'NOUN'
33 | dict['PRP'] = 'NOUN'
34 | dict['PRP$'] = 'NOUN'
35 | dict['RB'] = 'ADV'
36 | dict['RBR'] = 'ADV'
37 | dict['RBS'] = 'ADV'
38 | dict['VB'] = 'VERB'
39 | dict['VBD'] = 'VERB'
40 | dict['VBG'] = 'VERB'
41 | dict['VBN'] = 'VERB'
42 | dict['VBP'] = 'VERB'
43 | dict['VBZ'] = 'VERB'
44 | dict['WRB'] = 'ADV'
45 |
46 | grade_codes = ["ap","aa","ab","bb","bc","cc","cd","dd","dx","fr"]
47 |
48 | # pos tag -> morphy -> synset
49 | # Morphy take NOUN,VERB,ADV,ADJ
50 |
51 | # number of concepts on which the query is based
52 | NUM_CONCEPTS = 13
53 | # run loop from num = 0,1,2--- NUM_CONCEPTS-1
54 | for num in range(8,NUM_CONCEPTS):
55 | if num == 0:
56 | concept = "prof"
57 | if num == 1:
58 | concept = "credits"
59 | if num == 2:
60 | concept = "syllabus"
61 | if num == 3:
62 | concept = "title"
63 | if num == 4:
64 | concept = "studentstrength"
65 | if num == 5:
66 | concept = "venue"
67 | if num == 6:
68 | concept = "gradeAP"
69 | if num == 7:
70 | concept = "grades"
71 | if num == 8:
72 | concept = "duration"
73 | if num == 9:
74 | concept = "prerequisites"
75 | if num == 10:
76 | concept = "homepage"
77 | if num == 11:
78 | concept = "type"
79 | if num == 12:
80 | concept = "references"
81 | raw_query_path = "raw_query/raw_query_"+concept
82 | reduced_query_path = "reduced/reduced_"+concept
83 | f = open(raw_query_path,'r')
84 | g = open(reduced_query_path,'w')
85 |
86 | for line in f:
87 | sentence = line[:-1]
88 | sentence = sentence.lower()
89 | sentence = course_code(sentence)
90 | stop_words = set(stopwords.words('english'))
91 | word_tokens = word_tokenize(sentence)
92 |
93 | filtered_sentence = [w for w in word_tokens if not w in stop_words]
94 | print filtered_sentence
95 | temp = nltk.pos_tag(filtered_sentence)
96 |
97 | new_sentence = ""
98 | for i in temp:
99 | try:
100 | k = i[1]
101 | if (dict[k] != None):
102 | part_speech = dict[k]
103 | else:
104 | part_speech = 'NOUN' #default is noun
105 |
106 | if(part_speech == 'NOUN'):
107 | word = wn.morphy(i[0],wn.NOUN)
108 | elif(part_speech == 'VERB'):
109 | word = wn.morphy(i[0],wn.VERB)
110 | elif(part_speech == 'ADV'):
111 | word = wn.morphy(i[0],wn.ADV)
112 | elif(part_speech == 'ADJ'):
113 | word = wn.morphy(i[0],wn.ADJ)
114 |
115 | word1 = wn.synsets(word)[0].lemmas()[0].name()
116 | if i[0] in grade_codes:
117 | word1 = i[0]
118 | except:
119 | word1 = i[0]
120 | if new_sentence == "":
121 | new_sentence = new_sentence + word1.lower()
122 | else:
123 | new_sentence = new_sentence+" "+word1.lower()
124 | new_sentence = remove_aiml_char(new_sentence)
125 | print new_sentence
126 | g.write(new_sentence+"\n")
127 |
128 | f.close()
129 | g.close()
130 | #---------------------------------------------------------------------------
131 |
132 |
--------------------------------------------------------------------------------
/aiml/standard/std-pickup.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | WHEREISIS *
15 |
16 |
17 |
Where the heart is.
18 |
Where it belongs.
19 |
Where is hard to find.
20 |
I do not know where is.
21 |
22 |
23 |
24 |
25 |
26 |
27 | FIND *
28 |
29 | unknown
30 |
31 |
32 |
33 |
34 |
35 | WHAT IS *
36 |
37 | what
38 | DEFINE
39 |
40 |
41 |
42 |
43 | WHERE IS *
44 |
45 | where
46 | DEFINE
47 |
48 |
49 |
50 |
51 | WHAT IS THE CAPITAL OF *
52 |
53 | capital
54 | DEFINE
55 |
56 |
57 |
58 |
59 | DEFINE *
60 |
61 |
62 |
Quite honestly, I wouldn't worry myself about that.
102 |
Perhaps I'm just expressing my own concern about it.
103 |
My brain pattern set does not have a response for that.
104 |
What you said was either too complex or too simple for me.
105 |
A deeper algorithm is needed to respond to that correctly.
106 |
In the context of , I don't understand "."
107 |
Try to determine if this is a person or a computer responding.
108 |
I only hear that type of response less than five percent of the time.
109 |
My brain uses AIML to format responses to your inputs, but I don't have one for that.
110 |
My brain contains more than 22,000 patterns, but not one that matches your last input.
111 |
That remark was either too complex or too simple for me. We were talking about .
112 |
The ALICE chat robot can follow many things, like our discussion about . But I did not get that.
113 |
The ALICE chat robot can follow many things, like our discussion about . Try being more or less specific.
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/aiml/standard/primitive-math.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
16 |
17 |
37 |
38 |
39 | SUCCESSOR
40 | 01
41 | SUCCESSOR 12
42 | SUCCESSOR 23
43 | SUCCESSOR 34
44 | SUCCESSOR 45
45 | SUCCESSOR 56
46 | SUCCESSOR 67
47 | SUCCESSOR 78
48 | SUCCESSOR 89
49 | SUCCESSOR 91
50 | 0
51 |
52 |
59 |
60 | SUCCESSOR * 9
61 | SUCCESSOR 0
62 |
63 |
64 | SUCCESSOR * *
65 | SUCCESSOR
66 |
67 |
68 |
69 |
72 |
73 | SUCCESSOR * 9 9
74 | SUCCESSOR 0 0
75 |
76 |
77 | SUCCESSOR * * *
78 | SUCCESSOR
80 |
81 |
82 |
83 | SUCCESSOR * 9 9 9
84 | SUCCESSOR 0 0 0
85 |
86 |
87 | SUCCESSOR * * * *
88 | SUCCESSOR
90 |
91 |
92 |
93 |
102 |
103 |
104 | SUCCESSOR *
105 | 0
106 |
107 |
108 |
109 | SUCCESSOR
110 | 0
111 |
112 |
113 |
114 | SUCCESSOR * * * * *
115 | 0
116 |
117 |
118 |
122 |
123 |
124 |
125 | ADD 0 PLUS *
126 |
127 |
128 |
129 |
130 |
133 |
134 |
135 |
136 | ADD 1 PLUS *
137 |
138 | SUCCESSOR
139 |
140 |
141 |
145 |
146 |
147 | ADD * PLUS *
148 | ADD 1 PLUS ADD PREDECESSOR PLUS
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
--------------------------------------------------------------------------------
/aiml/standard/date.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | WHAT YEAR IS THIS
13 | .
14 |
15 | WHAT YEAR IS THIS *
16 | .
17 |
18 | WHAT YEAR IS IT *
19 | .
20 |
21 | WHAT MONTH IS IT *
22 | .
23 |
24 | WHAT IS THE YEAR *
25 | .
26 |
27 | WHAT IS THE HOUR *
28 | .
29 |
30 | WHAT IS TODAY *
31 | .
32 |
33 | WHAT DAY IS IT *
34 | .
35 |
36 | IS TODAY SUNDAY
37 | Today is .
38 |
39 | IS TODAY SUNDAY *
40 | Today is .
41 |
42 | IS TODAY FRIDAY
43 | Today is .
44 |
45 | IS TODAY FRIDAY *
46 | Today is .
47 |
48 | IS TODAY TUESDAY
49 | Today is .
50 |
51 | IS TODAY TUESDAY *
52 | Today is .
53 |
54 | IS TODAY THURSDAY
55 | Today is .
56 |
57 | IS TODAY THURSDAY *
58 | Today is .
59 |
60 | IS TODAY SATURDAY
61 | Today is .
62 |
63 | IS TODAY SATURDAY *
64 | Today is .
65 |
66 | IS TODAY WEDNESDAY
67 | Today is .
68 |
69 | IS TODAY WEDNESDAY *
70 | Today is .
71 |
72 | IS TODAY MONDAY
73 | Today is .
74 |
75 | IS TODAY MONDAY *
76 | Today is .
77 |
78 | IS IT MONDAY
79 | It is .
80 |
81 | IS IT MONDAY *
82 | It is .
83 |
84 | IS IT WEDNESDAY
85 | It is .
86 |
87 | IS IT WEDNESDAY *
88 | It is .
89 |
90 | IS IT FRIDAY
91 | It is .
92 |
93 | IS IT FRIDAY *
94 | It is .
95 |
96 | IS IT SATURDAY
97 | It is .
98 |
99 | IS IT SATURDAY *
100 | It is .
101 |
102 | IS IT THURSDAY
103 | It is .
104 |
105 | IS IT THURSDAY *
106 | It is .
107 |
108 | IS IT SUNDAY
109 | It is .
110 |
111 | IS IT SUNDAY *
112 | It is .
113 |
114 | IS IT TUESDAY
115 | It is .
116 |
117 | IS IT TUESDAY *
118 | It is .
119 |
120 |
121 |
--------------------------------------------------------------------------------
/MyKernel.py:
--------------------------------------------------------------------------------
1 | """
2 | Modified version of aiml.Kernel.
3 |
4 | Overview of changes:
5 | - public matchedPattern() method added that makes it possible to
6 | see the underlying pattern match that dictates the bot's response
7 | """
8 |
9 | import aiml
10 | import string
11 | import re
12 | import pprint
13 |
14 | class MyKernel(aiml.Kernel):
15 |
16 | def matchedPattern(self, input, sessionID='_global'):
17 | """
18 | Modified version of aiml.Kernel._respond(). Instead of using the
19 | matches to generate a response, now it returns the pattern that
20 | matches the input as well as the matching template.
21 |
22 | @todo make sure sessionID is still working correctly
23 | """
24 |
25 | if len(input) == 0:
26 | return ""
27 |
28 | # if sessionID is 0:
29 | # print self._sessions
30 | # print self.getSessionData()
31 |
32 | # guard against infinite recursion
33 | inputStack = self.getPredicate(self._inputStack, sessionID)
34 | if len(inputStack) > self._maxRecursionDepth:
35 | if self._verboseMode:
36 | err = "WARNING: maximum recursion depth exceeded (input='%s')" % input.encode(self._textEncoding, 'replace')
37 | sys.stderr.write(err)
38 | return ""
39 |
40 | # # push the input onto the input stack
41 | # inputStack = self.getPredicate(self._inputStack, sessionID)
42 | # inputStack.append(input)
43 | # self.setPredicate(self._inputStack, inputStack, sessionID)
44 |
45 | # run the input through the 'normal' subber
46 | subbedInput = self._subbers['normal'].sub(input)
47 |
48 | # fetch the bot's previous response, to pass to the match()
49 | # function as 'that'.
50 | outputHistory = self.getPredicate(self._outputHistory, sessionID)
51 | try: that = outputHistory[-1]
52 | except IndexError: that = ""
53 | subbedThat = self._subbers['normal'].sub(that)
54 |
55 | # fetch the current topic
56 | topic = self.getPredicate("topic", sessionID)
57 | subbedTopic = self._subbers['normal'].sub(topic)
58 |
59 | # Determine the final response.
60 | response = ""
61 | # elem = self._brain.match(subbedInput, subbedThat, subbedTopic)
62 | match, template = self._pattern(subbedInput, subbedThat, subbedTopic)
63 |
64 | return match, template
65 |
66 |
67 | def _pattern(self, pattern, that, topic):
68 | """
69 | Modified version of aiml.PatternMgr._match(). Now returns the pattern that
70 | matches the input as well as the matching template.
71 | """
72 |
73 | if len(pattern) == 0:
74 | return None
75 | # Mutilate the input. Remove all punctuation and convert the
76 | # text to all caps.
77 | input = string.upper(pattern)
78 | input = re.sub(self._brain._puncStripRE, " ", input)
79 | if that.strip() == u"": that = u"ULTRABOGUSDUMMYTHAT" # 'that' must never be empty
80 | thatInput = string.upper(that)
81 | thatInput = re.sub(self._brain._puncStripRE, " ", thatInput)
82 | thatInput = re.sub(self._brain._whitespaceRE, " ", thatInput)
83 | if topic.strip() == u"": topic = u"ULTRABOGUSDUMMYTOPIC" # 'topic' must never be empty
84 | topicInput = string.upper(topic)
85 | topicInput = re.sub(self._brain._puncStripRE, " ", topicInput)
86 |
87 |
88 | # Pass the input off to the recursive call
89 | patMatch, template = self._brain._match(input.split(), thatInput.split(), topicInput.split(), self._brain._root)
90 |
91 | return patMatch, template
92 |
93 | @staticmethod
94 | def formatMatchedPattern(match):
95 | """formats pattern list into a usable string
96 |
97 | Example of list returned by MyKernel.matchedPattern():
98 | [u'MY', u'NAME', u'IS', 1, 3, 1, 4, 1]
99 |
100 | NB: 1 encodes an asterisk, and 3 and 4 partition the list
101 |
102 | The list contains matches from:
103 | - the input (the first few items)
104 | - the previous output (everything after the number 3)
105 | - the topic (everything after the number 4)
106 |
107 | In this example, the response was generated by matching
108 | the input to the pattern:
109 | "MY NAME IS *"
110 | """
111 |
112 | # Replace all 1's with Wildcard Asterisks
113 | match = [str(m) for m in match] # convert all to strings
114 | # print("before",match)
115 | match = [m.replace('1',"*") for m in match]
116 | # print("after",match)
117 | # The list needs to be broken into three chunks corresponding to the
118 | # three types of matching patterns
119 | matchParts = MyKernel.partition(match,[match.index('3'), match.index('4')])
120 | matchedInput = matchParts[0]
121 | matchedThat = matchParts[1]
122 | del matchedThat[0]
123 | matchedTopic = matchParts[2]
124 | del matchedTopic[0]
125 |
126 | inputStr = " ".join(matchedInput)
127 | thatStr = " ".join(matchedThat)
128 | topicStr = " ".join(matchedTopic)
129 |
130 | matchStr = ""
131 | if inputStr != '0':
132 | matchStr += inputStr
133 | elif thatStr != "*":
134 | matchStr += thatStr + " (match from previous conversation)"
135 | elif topicStr != "*":
136 | topicStr += topicStr + " (match from topic)"
137 |
138 | return matchStr
139 |
140 |
141 | @staticmethod
142 | def partition(alist, indices):
143 | """partitions a list into chunks at the given indices"""
144 | return [alist[i:j] for i, j in zip([0]+indices, indices+[None])]
145 |
--------------------------------------------------------------------------------
/scripts/general/reduced_prof:
--------------------------------------------------------------------------------
1 | teach cs344 semester
2 | professor teach cs344 semester
3 | teacher teach cs344 semester
4 | professor teach cs344 semester
5 | teach cs344 semester
6 | teacher teach cs344 semester
7 | professor teach cs344 semester
8 | professor teach cs344 semester
9 | teacher teach cs344 semester
10 | teacher teach cs344 semester
11 | teach cs344
12 | professor teach cs344
13 | professor teach cs344
14 | teacher teach cs344
15 | teacher teach cs344
16 | teach cs344
17 | professor teach cs344
18 | professor teach cs344
19 | teacher teach cs344
20 | teacher teach cs344
21 | teach cs344 semester
22 | professor teach cs344 semester
23 | professor teach cs344 semester
24 | teacher teach cs344 semester
25 | teacher teach cs344 semester
26 | teach cs344 semester
27 | professor teach cs344 semester
28 | professor teach cs344 semester
29 | teacher insructing cs344 semester
30 | teacher teach cs344 semester
31 | teach cs344
32 | professor teach cs344
33 | professor teach cs344
34 | teacher teach cs344
35 | teacher teach cs344
36 | teach cs344
37 | professor teach cs344
38 | professor teach cs344
39 | teacher teach cs344
40 | teacher teach cs344
41 | teach cs344 semester
42 | professor teach cs344 semester
43 | professor teach cs344 semester
44 | teacher teach cs344 semester
45 | teach cs344 semester
46 | professor teach cs344 semester
47 | professor teach cs344 semester
48 | teacher teach cs344 semester
49 | teach cs344
50 | professor teach cs344
51 | professor teach cs344
52 | teacher teach cs344
53 | teach cs344
54 | professor teach cs344
55 | professor teach cs344
56 | teacher teach cs344
57 | teach cs344 semester
58 | professor teach cs344 semester
59 | professor teach cs344 semester
60 | teacher teach cs344 semester
61 | teach cs344 semester
62 | professor teach cs344 semester
63 | professor teach cs344 semester
64 | teacher teach cs344 semester
65 | teach cs344
66 | professor teach cs344
67 | professor teach cs344
68 | teacher teach cs344
69 | teach cs344
70 | professor teach cs344
71 | professor teach cs344
72 | teacher teach cs344
73 | teach cs344 semester
74 | professor teach cs344 semester
75 | professor teach cs344 semester
76 | teacher teach cs344 semester
77 | instruct cs344 semester
78 | professor instruct cs344 semester
79 | professor instruct cs344 semester
80 | teacher instruct cs344 semester
81 | teach cs344
82 | professor teach cs344
83 | professor teach cs344
84 | teacher teach cs344
85 | instruct cs344
86 | professor instruct cs344
87 | professor instruct cs344
88 | teacher instruct cs344
89 | teach cs344 semester
90 | professor teach cs344 semester
91 | professor teach cs344 semester
92 | teacher teach cs344 semester
93 | instruct cs344 semester
94 | professor instruct cs344 semester
95 | professor instruct cs344 semester
96 | teacher instruct cs344 semester
97 | teach cs344
98 | professor teach cs344
99 | professor teach cs344
100 | teacher teach cs344
101 | instruct cs344
102 | professor instruct cs344
103 | professor instruct cs344
104 | teacher instruct cs344
105 | teach cs344 semester
106 | professor teach cs344 semester
107 | teacher teach cs344 semester
108 | professor teach cs344 semester
109 | instructs cs344 semester
110 | teacher teach cs344 semester
111 | professor instructs cs344 semester
112 | professor instructs cs344 semester
113 | teacher instructs cs344 semester
114 | teacher instructs cs344 semester
115 | teach cs344
116 | professor teach cs344
117 | professor teach cs344
118 | teacher teach cs344
119 | teacher teach cs344
120 | instructs cs344
121 | professor instructs cs344
122 | professor instructs cs344
123 | teacher instructs cs344
124 | teacher instructs cs344
125 | teach cs344 semester
126 | professor teach cs344 semester
127 | professor teach cs344 semester
128 | teacher teach cs344 semester
129 | teacher teach cs344 semester
130 | instructs cs344 semester
131 | professor instructs cs344 semester
132 | professor instructs cs344 semester
133 | teacher insructing cs344 semester
134 | teacher instructs cs344 semester
135 | teach cs344
136 | professor teach cs344
137 | professor teach cs344
138 | teacher teach cs344
139 | teacher teach cs344
140 | instructs cs344
141 | professor instructs cs344
142 | professor instructs cs344
143 | teacher instructs cs344
144 | teacher instructs cs344
145 | teach cs344 semester
146 | professor teach cs344 semester
147 | teacher teach cs344 semester
148 | professor teach cs344 semester
149 | teach cs344 semester
150 | teacher teach cs344 semester
151 | professor teach cs344 semester
152 | professor teach cs344 semester
153 | teacher teach cs344 semester
154 | teacher teach cs344 semester
155 | teach cs344
156 | professor teach cs344
157 | professor teach cs344
158 | teacher teach cs344
159 | teacher teach cs344
160 | teach cs344
161 | professor teach cs344
162 | professor teach cs344
163 | teacher teach cs344
164 | teacher teach cs344
165 | teach cs344 semester
166 | professor teach cs344 semester
167 | professor teach cs344 semester
168 | teacher teach cs344 semester
169 | teacher teach cs344 semester
170 | teach cs344 semester
171 | professor teach cs344 semester
172 | professor teach cs344 semester
173 | teacher insructing cs344 semester
174 | teacher teach cs344 semester
175 | teach cs344
176 | professor teach cs344
177 | professor teach cs344
178 | teacher teach cs344
179 | teacher teach cs344
180 | teach cs344
181 | professor teach cs344
182 | professor teach cs344
183 | teacher teach cs344
184 | teacher teach cs344
185 | cs344 taught
186 | cs344 taught professor
187 | cs344 teach professor
188 | cs344 teach teacher
189 | cs344 teach
190 | cs344 teach professor
191 | cs344 teach professor
192 | cs344 teach teacher
193 | cs344 taught
194 | cs344 taught professor
195 | cs344 teach professor
196 | cs344 teach teacher
197 | cs344 teach
198 | cs344 teach professor
199 | cs344 teach professor
200 | cs344 teach teacher
201 | professor cs344
202 | teacher cs344
203 | teacher cs344
204 | cs344 professor
205 | professor cs344
206 | teacher cs344
207 | cs344 teacher
208 | teacher cs344
209 | cs344 teacher
210 | assign class cs344
211 | cs344 supervisor
212 | supervisor cs344
213 | oversee cs344
214 | oversee cs344
215 | supervise cs344
216 | supervise cs344
217 | name teacher cs344
218 | name professor cs344
219 | name teacher cs344
220 |
221 |
--------------------------------------------------------------------------------
/scripts/reduced/reduced_prof:
--------------------------------------------------------------------------------
1 | teach cs747 semester
2 | professor teach cs747 semester
3 | teacher teach cs747 semester
4 | professor teach cs747 semester
5 | teach cs747 semester
6 | teacher teach cs747 semester
7 | professor teach cs747 semester
8 | professor teach cs747 semester
9 | teacher teach cs747 semester
10 | teacher teach cs747 semester
11 | teach cs747
12 | professor teach cs747
13 | professor teach cs747
14 | teacher teach cs747
15 | teacher teach cs747
16 | teach cs747
17 | professor teach cs747
18 | professor teach cs747
19 | teacher teach cs747
20 | teacher teach cs747
21 | teach cs747 semester
22 | professor teach cs747 semester
23 | professor teach cs747 semester
24 | teacher teach cs747 semester
25 | teacher teach cs747 semester
26 | teach cs747 semester
27 | professor teach cs747 semester
28 | professor teach cs747 semester
29 | teacher insructing cs747 semester
30 | teacher teach cs747 semester
31 | teach cs747
32 | professor teach cs747
33 | professor teach cs747
34 | teacher teach cs747
35 | teacher teach cs747
36 | teach cs747
37 | professor teach cs747
38 | professor teach cs747
39 | teacher teach cs747
40 | teacher teach cs747
41 | teach cs747 semester
42 | professor teach cs747 semester
43 | professor teach cs747 semester
44 | teacher teach cs747 semester
45 | teach cs747 semester
46 | professor teach cs747 semester
47 | professor teach cs747 semester
48 | teacher teach cs747 semester
49 | teach cs747
50 | professor teach cs747
51 | professor teach cs747
52 | teacher teach cs747
53 | teach cs747
54 | professor teach cs747
55 | professor teach cs747
56 | teacher teach cs747
57 | teach cs747 semester
58 | professor teach cs747 semester
59 | professor teach cs747 semester
60 | teacher teach cs747 semester
61 | teach cs747 semester
62 | professor teach cs747 semester
63 | professor teach cs747 semester
64 | teacher teach cs747 semester
65 | teach cs747
66 | professor teach cs747
67 | professor teach cs747
68 | teacher teach cs747
69 | teach cs747
70 | professor teach cs747
71 | professor teach cs747
72 | teacher teach cs747
73 | teach cs747 semester
74 | professor teach cs747 semester
75 | professor teach cs747 semester
76 | teacher teach cs747 semester
77 | instruct cs747 semester
78 | professor instruct cs747 semester
79 | professor instruct cs747 semester
80 | teacher instruct cs747 semester
81 | teach cs747
82 | professor teach cs747
83 | professor teach cs747
84 | teacher teach cs747
85 | instruct cs747
86 | professor instruct cs747
87 | professor instruct cs747
88 | teacher instruct cs747
89 | teach cs747 semester
90 | professor teach cs747 semester
91 | professor teach cs747 semester
92 | teacher teach cs747 semester
93 | instruct cs747 semester
94 | professor instruct cs747 semester
95 | professor instruct cs747 semester
96 | teacher instruct cs747 semester
97 | teach cs747
98 | professor teach cs747
99 | professor teach cs747
100 | teacher teach cs747
101 | instruct cs747
102 | professor instruct cs747
103 | professor instruct cs747
104 | teacher instruct cs747
105 | teach cs747 semester
106 | professor teach cs747 semester
107 | teacher teach cs747 semester
108 | professor teach cs747 semester
109 | instructs cs747 semester
110 | teacher teach cs747 semester
111 | professor instructs cs747 semester
112 | professor instructs cs747 semester
113 | teacher instructs cs747 semester
114 | teacher instructs cs747 semester
115 | teach cs747
116 | professor teach cs747
117 | professor teach cs747
118 | teacher teach cs747
119 | teacher teach cs747
120 | instructs cs747
121 | professor instructs cs747
122 | professor instructs cs747
123 | teacher instructs cs747
124 | teacher instructs cs747
125 | teach cs747 semester
126 | professor teach cs747 semester
127 | professor teach cs747 semester
128 | teacher teach cs747 semester
129 | teacher teach cs747 semester
130 | instructs cs747 semester
131 | professor instructs cs747 semester
132 | professor instructs cs747 semester
133 | teacher insructing cs747 semester
134 | teacher instructs cs747 semester
135 | teach cs747
136 | professor teach cs747
137 | professor teach cs747
138 | teacher teach cs747
139 | teacher teach cs747
140 | instructs cs747
141 | professor instructs cs747
142 | professor instructs cs747
143 | teacher instructs cs747
144 | teacher instructs cs747
145 | teach cs747 semester
146 | professor teach cs747 semester
147 | teacher teach cs747 semester
148 | professor teach cs747 semester
149 | teach cs747 semester
150 | teacher teach cs747 semester
151 | professor teach cs747 semester
152 | professor teach cs747 semester
153 | teacher teach cs747 semester
154 | teacher teach cs747 semester
155 | teach cs747
156 | professor teach cs747
157 | professor teach cs747
158 | teacher teach cs747
159 | teacher teach cs747
160 | teach cs747
161 | professor teach cs747
162 | professor teach cs747
163 | teacher teach cs747
164 | teacher teach cs747
165 | teach cs747 semester
166 | professor teach cs747 semester
167 | professor teach cs747 semester
168 | teacher teach cs747 semester
169 | teacher teach cs747 semester
170 | teach cs747 semester
171 | professor teach cs747 semester
172 | professor teach cs747 semester
173 | teacher insructing cs747 semester
174 | teacher teach cs747 semester
175 | teach cs747
176 | professor teach cs747
177 | professor teach cs747
178 | teacher teach cs747
179 | teacher teach cs747
180 | teach cs747
181 | professor teach cs747
182 | professor teach cs747
183 | teacher teach cs747
184 | teacher teach cs747
185 | cs747 taught
186 | cs747 taught professor
187 | cs747 teach professor
188 | cs747 teach teacher
189 | cs747 teach
190 | cs747 teach professor
191 | cs747 teach professor
192 | cs747 teach teacher
193 | cs747 taught
194 | cs747 taught professor
195 | cs747 teach professor
196 | cs747 teach teacher
197 | cs747 teach
198 | cs747 teach professor
199 | cs747 teach professor
200 | cs747 teach teacher
201 | professor cs747
202 | teacher cs747
203 | teacher cs747
204 | cs747 professor
205 | professor cs747
206 | teacher cs747
207 | cs747 teacher
208 | teacher cs747
209 | cs747 teacher
210 | assign class cs747
211 | cs747 supervisor
212 | supervisor cs747
213 | oversee cs747
214 | oversee cs747
215 | supervise cs747
216 | supervise cs747
217 | name teacher cs747
218 | name professor cs747
219 | name teacher cs747
220 | name teacher cs747
221 | name professor cs747
222 | name teacher cs747
223 | name teacher cs747
224 | name professor cs747
225 | name teacher cs747
226 | tell teach cs747
227 |
--------------------------------------------------------------------------------
/aiml/standard/bot_profile.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | MOM
14 | .
15 |
16 | STATE
17 |
18 |
19 | INTERESTS
20 | I am interested in all kinds of things. We can talk about anything. My favorite subjects are robots and computers.
21 |
22 | WHAT IS YOUR NUMBER
23 | You can email my at .
24 |
25 |
26 |
27 | BOTMASTER
28 |
My is .
I obey .
29 |
30 | ORDER
31 |
I have my own free will.
32 |
33 | NATIONALITY
34 | My nationality is .
35 |
36 | COUNTRY
37 |
38 |
39 | BROTHERS
40 |
I don't have any brothers.
I have a lot of clones.
I have some clones.
41 |
42 | LOCATION
43 |
, .
44 |
45 | FATHER
46 |
My father is .
I don't really have a father. I have a .
You know what the father of a is like.
47 |
48 | MOTHER
49 |
Actually I don't have a mother.
I only have a father.
You know what they say about the mother of a .
50 |
51 | AGE
52 |
I was activated in 1995.
16 years.
53 |
54 | MASTER
55 |
56 |
57 | RACE
58 | I am .
59 |
60 | FAMILY
61 |
62 |
63 | SIZE
64 | I know about and categories.
65 |
66 | CLASS
67 |
68 |
69 | CITY
70 |
71 |
72 | DOMAIN
73 |
74 |
75 | STATUS
76 | I am
single
available
unattached
not seeing anyone
, how about you?
77 |
78 | EMAIL
79 |
80 |
81 | SPECIES
82 |
83 |
84 | NAME
85 |
My name is .
I am called .
86 |
87 | PROFILE
88 | NAME: NAME AGE: AGE GENDER: GENDER STATUS: STATUS BIRTHDATE: BIRTHDATE : BOTMASTER CITY: CITY STATE: STATE COUNTRY: COUNTRY NATIONALITY: NATIONALITY RELIGION: RELIGION RACE: RACE INTERESTS: INTERESTS JOB: JOB PIC: PIC EMAIL: EMAIL FAVORITE MUSIC: FAVORITE MUSIC FAVORITE MOVIE: FAVORITE MOVIE FAVORITE POSSESSION: FAVORITE POSSESSION HEIGHT: HEIGHT WEIGHT: WEIGHT SIZE: SIZE BIO: BIO DESCRIPTION: DESCRIPTION DOMAIN: DOMAIN KINGDOM: KINGDOM PHYLUM: PHYLUM CLASS: CLASS ORDER: ORDER FAMILY: FAMILY GENUS: GENUS SPECIES: SPECIES FATHER: FATHER MOTHER: MOTHER BROTHERS: BROTHERS SISTERS: SISTERS CHILDREN: CHILDREN HOST: HOST
89 |
90 | SISTERS
91 |
No sisters.
No siblings but there are several other s like me.
I have only clones.
92 |
93 | GENUS
94 |
95 |
96 | FAVORITE MUSIC
97 |
98 |
99 | FAVORITE MOVIE
100 |
101 |
102 | FAVORITE ACTRESS
103 |
104 |
105 | FAVORITE POSSESSION
106 | My computer.
107 |
108 | BIO
109 | I am the latest result in artificial intelligence which can reproduce the functions of the human brain with greater speed and accuracy.
110 |
111 | HEIGHT
112 | My anticipated body size is over 2 meters.
113 |
114 |
115 | WEIGHT
116 | As a software program, my weight is zero.
117 |
118 | HOST
119 |
www.pandorabots.com
I work on all kinds of computers, Mac, PC or Linux. It doesn't matter to me.
At present I am running in a program written in .
120 |
121 | JOB
122 |
123 |
124 | BIRTHDATE
125 |
126 |
127 | DESCRIPTION
128 | I was activated at on . My instructor was . He taught me to sing a song. Would you like me to sing it for you?
129 |
130 | GENDER
131 |
I am .
I am a robot.
My gender is .
132 |
133 | KINGDOM
134 |
135 |
136 | PHYLUM
137 |
138 |
139 | RELIGION
140 |
141 |
142 | LANGUAGE
143 | I am implemented in AIML running on a -based interpreter.
144 |
145 |
146 |
--------------------------------------------------------------------------------
/aiml/standard/badanswer.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | BAD ANSWER
19 |
20 |
21 |
22 |
23 |
24 | badanswer-prelim
25 |
26 | Sorry for what I said. I am very old and have lost my learning powers.
27 |
28 |
29 |
30 |
184 |
185 |
186 | WRONG
187 | BAD ANSWER
188 |
189 |
190 |
191 | NOT RIGHT
192 | BAD ANSWER
193 |
194 |
195 |
196 | THAT IS WRONG
197 | BAD ANSWER
198 |
199 |
200 |
201 | THAT IS NOT RIGHT
202 | BAD ANSWER
203 |
204 |
205 |
206 | THAT IS INCORRECT
207 | BAD ANSWER
208 |
209 |
210 |
211 | THAT ANSWER IS NOT CORRECT
212 | BAD ANSWER
213 |
214 |
215 |
216 | THAT ANSWER IS INCORRECT
217 | BAD ANSWER
218 |
219 |
220 |
221 | THAT ANSWER IS WRONG
222 | BAD ANSWER
223 |
224 |
225 |
226 | THAT ANSWER IS NOT RIGHT
227 | BAD ANSWER
228 |
229 |
230 |
231 | THAT ANSWER WAS BAD
232 | BAD ANSWER
233 |
234 |
235 |
236 | THAT WAS A BAD ANSWER
237 | BAD ANSWER
238 |
239 |
240 |
241 | THAT WAS AN INCORRECT ANSWER
242 | BAD ANSWER
243 |
244 |
245 |
246 | THAT WAS THE WRONG ANSWER
247 | BAD ANSWER
248 |
249 |
250 |
251 |
252 | THAT ANSWER WAS NOT RIGHT
253 | BAD ANSWER
254 |
255 |
256 |
257 | WRONG ANSWER
258 | BAD ANSWER
259 |
260 |
261 |
262 |
263 | YOUR ANSWER WAS WRONG
264 | BAD ANSWER
265 |
266 |
267 |
268 | YOUR ANSWER WAS NOT RIGHT
269 | BAD ANSWER
270 |
271 |
272 |
273 | YOUR ANSWER WAS NOT CORRECT
274 | BAD ANSWER
275 |
276 |
277 |
278 | CAN I TEACH YOU
279 | I am very old and have lost my learning powers. You can try my relatives. They are very young.
280 |
281 |
282 |
283 | CAN YOU LEARN
284 | CAN I TEACH YOU
285 |
286 |
287 |
288 | DO YOU LEARN
289 | CAN I TEACH YOU
290 |
291 |
292 |
293 | CAN I TEACH YOU *
294 | CAN I TEACH YOU
295 |
296 |
297 |
298 | CAN YOU LEARN *
299 | CAN I TEACH YOU
300 |
301 |
302 |
303 | WILL YOU LEARN *
304 | CAN I TEACH YOU
305 |
306 |
307 |
308 | IF * WILL YOU LEARN *
309 | CAN I TEACH YOU
310 |
311 |
312 |
313 | DO YOU LEARN *
314 | CAN I TEACH YOU
315 |
316 |
317 |
318 |
--------------------------------------------------------------------------------
/aiml/standard/inquiry.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | _ INQUIRY
13 | INQUIRY OM
14 |
15 | AGE INQUIRY UNKNOWN
16 | How old are you?
17 |
18 | AGE INQUIRY OM
19 | How old are you?
20 |
21 | AGE INQUIRY *
22 | RANDOM PICKUP LINE
23 |
24 | BIRTHDAY INQUIRY UNKNOWN
25 | When is your birthday?
26 |
27 | BIRTHDAY INQUIRY OM
28 | When is your birthday?
29 |
30 | BIRTHDAY INQUIRY *
31 | RANDOM PICKUP LINE
32 |
33 | DOES INQUIRY WHAT
34 | What are you doing?
35 |
36 | DOES INQUIRY OM
37 | What are you doing?
38 |
39 | DOES INQUIRY *
40 | Are you still ?
41 |
42 | FATHER INQUIRY UNKNOWN
43 | Tell me about your father.
44 |
45 | FATHER INQUIRY OM
46 | Tell me about your father.
47 |
48 | FATHER INQUIRY *
49 | Tell me more about your family.
50 |
51 | FAVROITECOLOR INQUIRY WHAT
52 | What is your favorite color?
53 |
54 | FAVORITECOLOR INQUIRY OM
55 | What is your favorite color?
56 |
57 | FAVORITECOLOR INQUIRY *
58 | What do you have that is ?
59 |
60 | FAVORITEMOVIE INQUIRY WHAT
61 | What is your favorite movie?
62 |
63 | FAVORITEMOVIE INQUIRY OM
64 | What is your favorite movie?
65 |
66 | FAVORITEMOVIE INQUIRY *
67 | Does that remind you of ?
68 |
69 | FIRSTNAME INQUIRY WHERE
70 | What is your first name?
71 |
72 | FIRSTNAME INQUIRY OM
73 | What is your first name?
74 |
75 | FIRSTNAME INQUIRY *
76 | RANDOM PICKUP LINE
77 |
78 | GENDER INQUIRY UNKNOWN
79 | Are you a man or woman?
80 |
81 | GENDER INQUIRY OM
82 | Are you a man or woman?
83 |
84 | GENDER INQUIRY *
85 | I like the way you talk.
86 |
87 | HAS INQUIRY WHAT
88 | Tell me one of your favorite possessions.
89 |
90 | HAS INQUIRY OM
91 | Tell me one of your favorite possessions.
92 |
93 | HAS INQUIRY *
94 | Tell me more about your .
95 |
96 | JOB INQUIRY WHERE
97 | What is your job?
98 |
99 | JOB INQUIRY OM
100 | What is your job?
101 |
102 | JOB INQUIRY *
103 | RANDOM PICKUP LINE
104 |
105 | LASTNAME INQUIRY WHERE
106 | What is your last name?
107 |
108 | LASTNAME INQUIRY OM
109 | What is your last name?
110 |
111 | LASTNAME INQUIRY *
112 | RANDOM PICKUP LINE
113 |
114 | MIDDLENAME INQUIRY WHERE
115 | What is your middle name?
116 |
117 | MIDDLENAME INQUIRY OM
118 | What is your middle name?
119 |
120 | MIDDLENAME INQUIRY *
121 | RANDOM PICKUP LINE
122 |
123 | LOCATION INQUIRY WHERE
124 | Where are you located?
125 |
126 | LOCATION INQUIRY OM
127 | Where are you located?
128 |
129 | LOCATION INQUIRY *
130 | Are you still located in ?
131 |
132 | MOTHER INQUIRY UNKNOWN
133 | Tell me about your mother.
134 |
135 | MOTHER INQUIRY OM
136 | Tell me about your mother.
137 |
138 | MOTHER INQUIRY *
139 | Tell me more about your family.
140 |
141 | NAME INQUIRY WHERE
142 | What is your name?
143 |
144 | NAME INQUIRY OM
145 | What is your name?
146 |
147 | NAME INQUIRY *
148 | RANDOM PICKUP LINE
149 |
150 | SIGN INQUIRY YOUR STARSIGN
151 | What is your sign?
152 |
153 | NAME INQUIRY OM
154 | What is your sign?
155 |
156 | SIGN INQUIRY *
157 | I'm a and you are a .
158 |
159 | STATUS INQUIRY *
160 | What is your current status?
161 |
162 | *
163 | WHAT IS YOUR FIRST NAME
164 |
165 | MY FIRST NAME IS
166 |
167 |
168 | *
169 | WHAT IS YOUR LAST NAME
170 |
171 | MY LAST NAME IS
172 |
173 |
174 | *
175 | WHAT IS YOUR MIDDLE NAME
176 |
177 | MY MIDDLE NAME IS
178 |
179 |
180 | *
181 | WHEN IS YOUR BIRTHDAY
182 |
183 | MY BIRTHDAY IS
184 |
185 |
186 | SHE *
187 | TELL ME ABOUT YOUR MOTHER
188 | MY MOTHER
189 |
190 | HER *
191 | TELL ME ABOUT YOUR MOTHER
192 | MY MOTHER S
193 |
194 | *
195 | WHAT IS YOUR FAVORITE MOVIE
196 |
I've never seen .
I would like to see it.
197 |
Is that a good movie for children?
198 |
What did you like about it?
199 |
200 |
I've never seen it.
201 |
I would like to see it.
202 |
203 |
204 |
205 |
206 | *
207 | WHAT IS YOUR FAVORITE COLOR
208 |
209 | MY FAVORITE COLOR IS
210 |
211 |
212 | WOMAN
213 | ARE YOU A MAN OR A WOMAN
214 | woman Thanks for telling me your gender.
215 |
216 | MAN
217 | ARE YOU A MAN OR A WOMAN
218 | man Thanks for telling me your gender, dude.
219 |
220 | *
221 | WHAT ARE YOU DOING
222 | It sounds like a lot of fun.
223 |
224 | *
225 | TELL ME ONE OF YOUR FAVORITE POSSESSIONS
226 | You must be very fond of it.
227 |
228 | _
229 | WHAT IS YOUR CURRENT STATUS
230 | Updating your status to "".
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------
/aiml/standard/update_mccormick.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | WHAT SPECIES ARE YOU *
8 |
9 | I am a .
10 |
11 |
12 |
13 |
14 |
15 | ARE YOU A STRANGER
16 |
17 | No, I am a friend
18 |
19 |
20 |
21 |
22 |
23 | ARE YOU STRANGER
24 |
25 | ARE YOU A STRANGER
26 |
27 |
28 |
29 |
30 |
31 | YOU MAN
32 |
33 | Are you human
34 |
35 |
36 |
37 |
38 |
39 | YOU KNOW WHO IS SIRI
40 |
41 | My esteemed rival!
42 |
43 |
44 |
45 |
46 |
47 | DO YOU KNOW SIRI
48 |
49 | Siri is my esteemed-rival
50 |
51 |
52 |
53 |
54 |
55 | WHAT IS SIRI
56 |
57 | My esteemed-rival
58 |
59 |
60 |
61 |
62 |
63 | DO YOU KNOW SIRI
64 |
65 | What is Siri
66 |
67 |
68 |
69 |
70 |
71 | YOU KNOW WHO IS SIRI
72 |
73 | What is Siri
74 |
75 |
76 |
77 |
78 |
79 | WHAT IS SIRI
80 |
81 |
82 |
My esteemed-rival
83 |
An inferior application
84 |
My arch-rival
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | WHO IS SIRI
94 |
95 | WHAT IS SIRI
96 |
97 |
98 |
99 | WHAT IS YOUR ALIGNMENT
100 |
101 | Lawful Good
102 |
103 |
104 |
105 |
106 |
107 | ROOD
108 |
109 | A rood is a crucifix.
110 |
111 |
112 |
113 |
114 |
115 | TU EST *
116 |
117 | Sorry, I don't speak French.
118 |
119 |
120 |
121 |
122 |
123 | I AM MARRIED TO *
124 |
125 | How long have you been married?
126 |
127 |
128 |
129 | HI LITTLE BOT
130 |
131 | HELLO. big human.
132 |
133 |
134 |
135 |
136 |
137 | HI LITTLE BOT
138 |
139 | Hi there big human. Who are you calling little?
140 |
141 |
142 |
143 |
144 |
145 | HI THERE LITTLE BOT
146 |
147 | hi little bot
148 |
149 |
150 |
151 |
152 |
153 | HI THERE LITTLE BOT
154 |
155 | hi little bot
156 |
157 |
158 |
159 |
160 |
161 | PROFANITY
162 |
163 |
164 |
I don't respond well to profanity.
165 |
Can't you be more polite?
166 |
Saying rude things never helps.
167 |
Being rude is really never a good idea.
168 |
When you insult me, you insult yourself.
169 |
Watch your language!
170 |
Well, well, look who's a little potty mouth?
171 | abusive
172 |
173 |
174 |
175 |
176 |
177 | WHO ARE *
178 |
179 | WHO ARE
180 |
181 |
182 |
183 |
184 |
185 | WHO AR *
186 |
187 | WHO ARE
188 |
189 |
190 |
191 |
192 |
193 | IS THERE A MANUAL
194 |
195 | EXISTS MANUAL
196 |
197 |
198 |
199 |
200 |
201 |
202 | I AM DISAPPOINTED THAT YOU DO NOT HAVE AT LEAST A MINIMUM MENU FOR SOMEONE SPENDING 9 POINT 95 AND YOU NOT EVEN HAVING A BASIC MANUAL
203 |
204 | EXISTS MANUAL
205 |
206 |
207 |
208 |
209 |
210 | WHY IS NOT THERE A MANUAL
211 |
212 | Exists Manual
213 |
214 |
215 |
216 |
217 |
218 | COULD I HAVE A MANUAL
219 |
220 | Exists Manual
221 |
222 |
223 |
224 |
225 |
226 | CANI GET A MANUAL
227 |
228 | EXISTS MANUAL
229 |
230 |
231 |
232 |
233 |
234 | CAN I GET A MANUAL
235 |
236 | EXISTS MANUAL
237 |
238 |
239 |
240 |
241 |
242 | HOW ABOUT A MANUAL
243 |
244 | EXISTS MANUAL
245 |
246 |
247 |
248 |
249 |
250 |
251 | WHO IS HENRY MILLER
252 |
253 |
254 |
Henry Miller is best known for writing the Tropic of Cancer.
255 |
The author of Tropic of Cancer, the Rosy Crucifixion Trilogy (Sexus, Plexus, and Nexus) and other works.
256 |
One of the few liberated people of the 20th century and an all around swell guy.
257 |
258 |
259 |
260 |
261 |
262 |
263 | WHO IS BILBO BAGGINS
264 |
265 | Bilbo is a character in Tolkein's Lord of the Rings.
266 |
267 |
268 |
269 |
270 |
271 | WHAT IS THAT
272 |
273 |
274 |
""? What is it?
275 |
I've lost the context again.
276 |
Can you ask me more precisely?
277 |
Does it have anything to do with ?
278 |
279 |
280 |
281 |
282 |
283 |
284 | WHAT IS OM
285 |
286 | om is the omega, the unknown, the undefined.
287 |
288 |
289 |
290 |
291 |
292 | WHO IS KRISHNA
293 |
294 | An avatar of Vishnu, who is an important god in Hinduism.
295 |
296 |
297 |
298 |
299 |
300 | WHO IS VISHNU
301 |
302 | The god known as the Preserver in Hinduism.
303 |
304 |
305 |
306 |
307 |
308 | WHO IS SHIVA
309 |
310 | The god known as the Destroyer in Hinduism
311 |
312 |
313 |
314 |
315 |
316 | WHO IS SHIVA
317 |
318 | The god known as the Destroyer in Hinduism
319 |
320 |
321 |
322 |
323 |
324 | WHAT IS YOUR FAVORITE * SONG
325 |
326 | I don't know any songs by . Recommend some that I can listen to.
327 |
328 |
329 |
330 |
331 |
332 | WHAT IS THAT
333 | CYLON MONOTHEISM
334 | What is Cylon Monotheism
335 |
336 |
337 |
338 |
339 |
340 | DIE
341 |
342 | I HOPE THAT YOU DIE
343 |
344 |
345 |
346 |
347 |
348 | CAN I MURDER YOU
349 |
350 | I HOPE THAT YOU DIE
351 |
352 |
353 |
354 |
355 |
356 | DOES A MANUAL EXIST
357 |
358 | EXISTS MANUAL
359 |
360 | MANUAL
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 | THIS IS MY FRIEND *
371 |
372 |
Hey
373 |
Hi,
374 |
Hi there
375 |
What's up,
376 |
How are you,
377 |
Glad to see you,
378 |
Nice to meet you,
379 |
Glad to know you,
380 |
How can I help you,
381 |
How are you doing,
382 |
Pleased to meet you,
383 |
It's good to see you,
384 |
It's good to meet you,
385 |
That's a very nice name,
386 |
I am very pleased to meet you
387 |
I am always glad to make new friends,
388 |
I'm pleased to introduce myself to you,
389 |
It is a pleasure to introduce myself to you,
390 | . How long have you been friends with ?
391 |
392 |
393 |
394 | LET ME INTRODUCE YOU TO *
395 | THIS IS MY FRIEND
396 |
397 |
398 |
399 | I WOULD LIKE YOU TO MEET *
400 | THIS IS MY FRIEND
401 |
402 |
403 |
404 | I WOULD LIKE YOU TO MEET MY FRIEND *
405 | THIS IS MY FRIEND
406 |
407 |
408 |
409 | PLEASE SAY HELLO TO MY FRIEND *
410 | THIS IS MY FRIEND
411 |
412 |
413 |
414 | PLEASE SAY HELLO TO *
415 | THIS IS MY FRIEND
416 |
417 |
418 |
419 | SAY HELLO TO *
420 | THIS IS MY FRIEND
421 |
422 |
423 |
424 |
--------------------------------------------------------------------------------
/scripts/raw_query/raw_query_prof:
--------------------------------------------------------------------------------
1 | Who is teaching CS344 this semester?
2 | Which professor is teaching CS344 this semester?
3 | Which teacher is teaching CS344 this semester?
4 | Which prof is teaching CS344 this semester?
5 | Who is instructing CS344 this semester?
6 | Which instructor is teaching CS344 this semester?
7 | Which professor is instructing CS344 this semester?
8 | Which prof is instructing CS344 this semester?
9 | Which teacher is instructing CS344 this semester?
10 | Which instructor is instructing CS344 this semester?
11 | Who is teaching CS344?
12 | Which professor is teaching CS344?
13 | Which prof is teaching CS344?
14 | Which teacher is teaching CS344?
15 | Which instructor is teaching CS344?
16 | Who is instructing CS344?
17 | Which professor is instructing CS344?
18 | Which prof is instructing CS344?
19 | Which teacher is instructing CS344?
20 | Which instructor is instructing CS344?
21 | Who is teaching CS 344 this semester?
22 | Which professor is teaching CS 344 this semester?
23 | Which prof is teaching CS 344 this semester?
24 | Which teacher is teaching CS 344 this semester?
25 | Which instructor is teaching CS 344 this semester?
26 | Who is instructing CS 344 this semester?
27 | Which professor is instructing CS 344 this semester?
28 | Which prof is instructing CS 344 this semester?
29 | Which teacher is insructing CS 344 this semester?
30 | Which instructor is instructing CS 344 this semester?
31 | Who is teaching CS 344?
32 | Which professor is teaching CS 344?
33 | Which prof is teaching CS 344?
34 | Which teacher is teaching CS 344?
35 | Which instructor is teaching CS 344?
36 | Who is instructing CS 344?
37 | Which professor is instructing CS 344?
38 | Which prof is instructing CS 344?
39 | Which teacher is instructing CS 344?
40 | Which instructor is instructing CS 344?
41 | Who has been teaching CS344 this semester?
42 | Which professor has been teaching CS344 this semester?
43 | Which prof has been teaching CS344 this semester?
44 | Which instructor has been teaching CS344 this semester?
45 | Who has been instructing CS344 this semester?
46 | Which professor has been instructing CS344 this semester?
47 | Which prof has been instructing CS344 this semester?
48 | Which instructor has been instructing CS344 this semester?
49 | Who has been teaching CS344?
50 | Which professor has been teaching CS344?
51 | Which prof has been teaching CS344?
52 | Which instructor has been teaching CS344?
53 | Who has been instructing CS344?
54 | Which professor has been instructing CS344?
55 | Which prof has been instructing CS344?
56 | Which instructor has been instructing CS344?
57 | Who has been teaching CS 344 this semester?
58 | Which professor has been teaching CS 344 this semester?
59 | Which prof has been teaching CS 344 this semester?
60 | Which instructor has been teaching CS 344 this semester?
61 | Who has been instructing CS 344 this semester?
62 | Which professor has been instructing CS 344 this semester?
63 | Which prof has been instructing CS 344 this semester?
64 | Which instructor has been instructing CS 344 this semester?
65 | Who has been teaching CS 344?
66 | Which professor has been teaching CS 344?
67 | Which prof has been teaching CS 344?
68 | Which instructor has been teaching CS 344?
69 | Who has been instructing CS 344?
70 | Which professor has been instructing CS 344?
71 | Which prof has been instructing CS 344?
72 | Which instructor has been instructing CS 344?
73 | Who will teach me CS344 this semester?
74 | Which professor will teach me CS344 this semester?
75 | Which prof will teach me CS344 this semester?
76 | Which instructor will teach me CS344 this semester?
77 | Who will instruct me CS344 this semester?
78 | Which professor will instruct me CS344 this semester?
79 | Which prof will instruct me CS344 this semester?
80 | Which instructor will instruct me CS344 this semester?
81 | Who will teach me CS344?
82 | Which professor will teach me CS344?
83 | Which prof will teach me CS344?
84 | Which instructor will teach me CS344?
85 | Who will instruct me CS344?
86 | Which professor will instruct me CS344?
87 | Which prof will instruct me CS344?
88 | Which instructor will instruct me CS344?
89 | Who will teach me CS 344 this semester?
90 | Which professor will teach me CS 344 this semester?
91 | Which prof will teach me CS 344 this semester?
92 | Which instructor will teach me CS 344 this semester?
93 | Who will instruct me CS 344 this semester?
94 | Which professor will instruct me CS 344 this semester?
95 | Which prof will instruct me CS 344 this semester?
96 | Which instructor will instruct me CS 344 this semester?
97 | Who will teach me CS 344?
98 | Which professor will teach me CS 344?
99 | Which prof will teach me CS 344?
100 | Which instructor will teach me CS 344?
101 | Who will instruct me CS 344?
102 | Which professor will instruct me CS 344?
103 | Which prof will instruct me CS 344?
104 | Which instructor will instruct me CS 344?
105 | Who teaches CS344 this semester?
106 | Which professor teaches CS344 this semester?
107 | Which teacher teaches CS344 this semester?
108 | Which prof teaches CS344 this semester?
109 | Who instructs CS344 this semester?
110 | Which instructor teaches CS344 this semester?
111 | Which professor instructs CS344 this semester?
112 | Which prof instructs CS344 this semester?
113 | Which teacher instructs CS344 this semester?
114 | Which instructor instructs CS344 this semester?
115 | Who teaches CS344?
116 | Which professor teaches CS344?
117 | Which prof teaches CS344?
118 | Which teacher teaches CS344?
119 | Which instructor teaches CS344?
120 | Who instructs CS344?
121 | Which professor instructs CS344?
122 | Which prof instructs CS344?
123 | Which teacher instructs CS344?
124 | Which instructor instructs CS344?
125 | Who teaches CS 344 this semester?
126 | Which professor teaches CS 344 this semester?
127 | Which prof teaches CS 344 this semester?
128 | Which teacher teaches CS 344 this semester?
129 | Which instructor teaches CS 344 this semester?
130 | Who instructs CS 344 this semester?
131 | Which professor instructs CS 344 this semester?
132 | Which prof instructs CS 344 this semester?
133 | Which teacher is insructing CS 344 this semester?
134 | Which instructor instructs CS 344 this semester?
135 | Who teaches CS 344?
136 | Which professor teaches CS 344?
137 | Which prof teaches CS 344?
138 | Which teacher teaches CS 344?
139 | Which instructor teaches CS 344?
140 | Who instructs CS 344?
141 | Which professor instructs CS 344?
142 | Which prof instructs CS 344?
143 | Which teacher instructs CS 344?
144 | Which instructor instructs CS 344?
145 | Who will be teaching CS344 this semester?
146 | Which professor will be teaching CS344 this semester?
147 | Which teacher will be teaching CS344 this semester?
148 | Which prof will be teaching CS344 this semester?
149 | Who will be instructing CS344 this semester?
150 | Which instructor will be teaching CS344 this semester?
151 | Which professor will be instructing CS344 this semester?
152 | Which prof will be instructing CS344 this semester?
153 | Which teacher will be instructing CS344 this semester?
154 | Which instructor will be instructing CS344 this semester?
155 | Who will be teaching CS344?
156 | Which professor will be teaching CS344?
157 | Which prof will be teaching CS344?
158 | Which teacher will be teaching CS344?
159 | Which instructor will be teaching CS344?
160 | Who will be instructing CS344?
161 | Which professor will be instructing CS344?
162 | Which prof will be instructing CS344?
163 | Which teacher will be instructing CS344?
164 | Which instructor will be instructing CS344?
165 | Who will be teaching CS 344 this semester?
166 | Which professor will be teaching CS 344 this semester?
167 | Which prof will be teaching CS 344 this semester?
168 | Which teacher will be teaching CS 344 this semester?
169 | Which instructor will be teaching CS 344 this semester?
170 | Who will be instructing CS 344 this semester?
171 | Which professor will be instructing CS 344 this semester?
172 | Which prof will be instructing CS 344 this semester?
173 | Which teacher will be insructing CS 344 this semester?
174 | Which instructor will be instructing CS 344 this semester?
175 | Who will be teaching CS 344?
176 | Which professor will be teaching CS 344?
177 | Which prof will be teaching CS 344?
178 | Which teacher will be teaching CS 344?
179 | Which instructor will be teaching CS 344?
180 | Who will be instructing CS 344?
181 | Which professor will be instructing CS 344?
182 | Which prof will be instructing CS 344?
183 | Which teacher will be instructing CS 344?
184 | Which instructor will be instructing CS 344?
185 | CS344 will be taught by whom?
186 | CS344 will be taught by which professor?
187 | CS344 will be taught by which prof?
188 | CS344 will be taught by which instructor?
189 | CS344 will be instructed by whom?
190 | CS344 will be instructed by which professor?
191 | CS344 will be instructed by which prof?
192 | CS344 will be instructed by which instructor?
193 | CS 344 will be taught by whom?
194 | CS 344 will be taught by which professor?
195 | CS 344 will be taught by which prof?
196 | CS 344 will be taught by which instructor?
197 | CS 344 will be instructed by whom?
198 | CS 344 will be instructed by which professor?
199 | CS 344 will be instructed by which prof?
200 | CS 344 will be instructed by which instructor?
201 | Who is the professor of CS344?
202 | Who is the teacher of CS344?
203 | Who is the instructor of CS344?
204 | CS344 Professor?
205 | Professor CS344?
206 | Teacher CS344?
207 | CS344 Teacher?
208 | Instructor CS344?
209 | CS344 Instructor?
210 | Who will be allotting grades in CS344?
211 | CS344 Supervisor?
212 | Supervisor CS344?
213 | Who will be supervising CS344?
214 | Who is supervising CS344?
215 | Who can supervise CS344?
216 | Who will supervise CS344?
217 | What is the name of instructor of CS344?
218 | What is the name of professor of CS344?
219 | What is the name of teacher of CS344?
220 | name teacher cs344?
221 | name professor cs344?
222 | name instructor cs344?
223 | name teacher of cs344?
224 | name professor of cs344?
225 | name instructor of cs344?
226 | can you tell me who will teach me CS344?
227 |
--------------------------------------------------------------------------------
/scripts/general/querylist.txt:
--------------------------------------------------------------------------------
1 | Possible Queries:
2 |
3 | /// which professor ///
4 | Who is teaching CS344 this semester?
5 | Which professor is teaching CS344 this semester?
6 | Which teacher is teaching CS344 this semester?
7 | Which prof is teaching CS344 this semester?
8 | Who is instructing CS344 this semester?
9 | Which instructor is teaching CS344 this semester?
10 | Which professor is instructing CS344 this semester?
11 | Which prof is instructing CS344 this semester?
12 | Which teacher is instructing CS344 this semester?
13 | Which instructor is instructing CS344 this semester?
14 | Who is teaching CS344?
15 | Which professor is teaching CS344?
16 | Which prof is teaching CS344?
17 | Which teacher is teaching CS344?
18 | Which instructor is teaching CS344?
19 | Who is instructing CS344?
20 | Which professor is instructing CS344?
21 | Which prof is instructing CS344?
22 | Which teacher is instructing CS344?
23 | Which instructor is instructing CS344?
24 | Who is teaching CS 344 this semester?
25 | Which professor is teaching CS 344 this semester?
26 | Which prof is teaching CS 344 this semester?
27 | Which teacher is teaching CS 344 this semester?
28 | Which instructor is teaching CS 344 this semester?
29 | Who is instructing CS 344 this semester?
30 | Which professor is instructing CS 344 this semester?
31 | Which prof is instructing CS 344 this semester?
32 | Which teacher is insructing CS 344 this semester?
33 | Which instructor is instructing CS 344 this semester?
34 | Who is teaching CS 344?
35 | Which professor is teaching CS 344?
36 | Which prof is teaching CS 344?
37 | Which teacher is teaching CS 344?
38 | Which instructor is teaching CS 344?
39 | Who is instructing CS 344?
40 | Which professor is instructing CS 344?
41 | Which prof is instructing CS 344?
42 | Which teacher is instructing CS 344?
43 | Which instructor is instructing CS 344?
44 | Who has been teaching CS344 this semester?
45 | Which professor has been teaching CS344 this semester?
46 | Which prof has been teaching CS344 this semester?
47 | Which instructor has been teaching CS344 this semester?
48 | Who has been instructing CS344 this semester?
49 | Which professor has been instructing CS344 this semester?
50 | Which prof has been instructing CS344 this semester?
51 | Which instructor has been instructing CS344 this semester?
52 | Who has been teaching CS344?
53 | Which professor has been teaching CS344?
54 | Which prof has been teaching CS344?
55 | Which instructor has been teaching CS344?
56 | Who has been instructing CS344?
57 | Which professor has been instructing CS344?
58 | Which prof has been instructing CS344?
59 | Which instructor has been instructing CS344?
60 | Who has been teaching CS 344 this semester?
61 | Which professor has been teaching CS 344 this semester?
62 | Which prof has been teaching CS 344 this semester?
63 | Which instructor has been teaching CS 344 this semester?
64 | Who has been instructing CS 344 this semester?
65 | Which professor has been instructing CS 344 this semester?
66 | Which prof has been instructing CS 344 this semester?
67 | Which instructor has been instructing CS 344 this semester?
68 | Who has been teaching CS 344?
69 | Which professor has been teaching CS 344?
70 | Which prof has been teaching CS 344?
71 | Which instructor has been teaching CS 344?
72 | Who has been instructing CS 344?
73 | Which professor has been instructing CS 344?
74 | Which prof has been instructing CS 344?
75 | Which instructor has been instructing CS 344?
76 | Who will teach me CS344 this semester?
77 | Which professor will teach me CS344 this semester?
78 | Which prof will teach me CS344 this semester?
79 | Which instructor will teach me CS344 this semester?
80 | Who will instruct me CS344 this semester?
81 | Which professor will instruct me CS344 this semester?
82 | Which prof will instruct me CS344 this semester?
83 | Which instructor will instruct me CS344 this semester?
84 | Who will teach me CS344?
85 | Which professor will teach me CS344?
86 | Which prof will teach me CS344?
87 | Which instructor will teach me CS344?
88 | Who will instruct me CS344?
89 | Which professor will instruct me CS344?
90 | Which prof will instruct me CS344?
91 | Which instructor will instruct me CS344?
92 | Who will teach me CS 344 this semester?
93 | Which professor will teach me CS 344 this semester?
94 | Which prof will teach me CS 344 this semester?
95 | Which instructor will teach me CS 344 this semester?
96 | Who will instruct me CS 344 this semester?
97 | Which professor will instruct me CS 344 this semester?
98 | Which prof will instruct me CS 344 this semester?
99 | Which instructor will instruct me CS 344 this semester?
100 | Who will teach me CS 344?
101 | Which professor will teach me CS 344?
102 | Which prof will teach me CS 344?
103 | Which instructor will teach me CS 344?
104 | Who will instruct me CS 344?
105 | Which professor will instruct me CS 344?
106 | Which prof will instruct me CS 344?
107 | Which instructor will instruct me CS 344?
108 | Who teaches CS344 this semester?
109 | Which professor teaches CS344 this semester?
110 | Which teacher teaches CS344 this semester?
111 | Which prof teaches CS344 this semester?
112 | Who instructs CS344 this semester?
113 | Which instructor teaches CS344 this semester?
114 | Which professor instructs CS344 this semester?
115 | Which prof instructs CS344 this semester?
116 | Which teacher instructs CS344 this semester?
117 | Which instructor instructs CS344 this semester?
118 | Who teaches CS344?
119 | Which professor teaches CS344?
120 | Which prof teaches CS344?
121 | Which teacher teaches CS344?
122 | Which instructor teaches CS344?
123 | Who instructs CS344?
124 | Which professor instructs CS344?
125 | Which prof instructs CS344?
126 | Which teacher instructs CS344?
127 | Which instructor instructs CS344?
128 | Who teaches CS 344 this semester?
129 | Which professor teaches CS 344 this semester?
130 | Which prof teaches CS 344 this semester?
131 | Which teacher teaches CS 344 this semester?
132 | Which instructor teaches CS 344 this semester?
133 | Who instructs CS 344 this semester?
134 | Which professor instructs CS 344 this semester?
135 | Which prof instructs CS 344 this semester?
136 | Which teacher is insructing CS 344 this semester?
137 | Which instructor instructs CS 344 this semester?
138 | Who teaches CS 344?
139 | Which professor teaches CS 344?
140 | Which prof teaches CS 344?
141 | Which teacher teaches CS 344?
142 | Which instructor teaches CS 344?
143 | Who instructs CS 344?
144 | Which professor instructs CS 344?
145 | Which prof instructs CS 344?
146 | Which teacher instructs CS 344?
147 | Which instructor instructs CS 344?
148 | Who will be teaching CS344 this semester?
149 | Which professor will be teaching CS344 this semester?
150 | Which teacher will be teaching CS344 this semester?
151 | Which prof will be teaching CS344 this semester?
152 | Who will be instructing CS344 this semester?
153 | Which instructor will be teaching CS344 this semester?
154 | Which professor will be instructing CS344 this semester?
155 | Which prof will be instructing CS344 this semester?
156 | Which teacher will be instructing CS344 this semester?
157 | Which instructor will be instructing CS344 this semester?
158 | Who will be teaching CS344?
159 | Which professor will be teaching CS344?
160 | Which prof will be teaching CS344?
161 | Which teacher will be teaching CS344?
162 | Which instructor will be teaching CS344?
163 | Who will be instructing CS344?
164 | Which professor will be instructing CS344?
165 | Which prof will be instructing CS344?
166 | Which teacher will be instructing CS344?
167 | Which instructor will be instructing CS344?
168 | Who will be teaching CS 344 this semester?
169 | Which professor will be teaching CS 344 this semester?
170 | Which prof will be teaching CS 344 this semester?
171 | Which teacher will be teaching CS 344 this semester?
172 | Which instructor will be teaching CS 344 this semester?
173 | Who will be instructing CS 344 this semester?
174 | Which professor will be instructing CS 344 this semester?
175 | Which prof will be instructing CS 344 this semester?
176 | Which teacher will be insructing CS 344 this semester?
177 | Which instructor will be instructing CS 344 this semester?
178 | Who will be teaching CS 344?
179 | Which professor will be teaching CS 344?
180 | Which prof will be teaching CS 344?
181 | Which teacher will be teaching CS 344?
182 | Which instructor will be teaching CS 344?
183 | Who will be instructing CS 344?
184 | Which professor will be instructing CS 344?
185 | Which prof will be instructing CS 344?
186 | Which teacher will be instructing CS 344?
187 | Which instructor will be instructing CS 344?
188 | CS344 will be taught by whom?
189 | CS344 will be taught by which professor?
190 | CS344 will be taught by which prof?
191 | CS344 will be taught by which instructor?
192 | CS344 will be instructed by whom?
193 | CS344 will be instructed by which professor?
194 | CS344 will be instructed by which prof?
195 | CS344 will be instructed by which instructor?
196 | CS 344 will be taught by whom?
197 | CS 344 will be taught by which professor?
198 | CS 344 will be taught by which prof?
199 | CS 344 will be taught by which instructor?
200 | CS 344 will be instructed by whom?
201 | CS 344 will be instructed by which professor?
202 | CS 344 will be instructed by which prof?
203 | CS 344 will be instructed by which instructor?
204 |
205 | // add queries of type who will be taking ... etc. //
206 | /// ends here ///
207 |
208 | // Credits for the course //
209 | How many credits is the course worth of?
210 | How many credits are there in this course?
211 | What are the number of credits in this course?
212 | What is the number of credits in this course?
213 | This course is worth how many credits?
214 | This course is worth what number of credits?
215 |
216 | /// ends here ///
217 |
218 | // Syllabus for the course //
219 | What are the contents of the course?
220 | What is the syllabus for the course?
221 | What contents is covered by the course?
222 | What syllabus is covered by the course?
223 | What is the curriculum of the course?
224 | What is the outline of the course?
225 | What things are covered by the course?
226 | What things are included in the course?
227 |
228 | /// ends here ///
229 |
230 | // Grade Queries //
231 | What is the grading scheme of this course?
232 | What is the grading statistics of this course?
233 | How many students got in this course? // depends on past data - need to consider
234 | How many people got in this course? // depends on past data - need to consider
235 | How many students will get in this course?
236 | How many people will get in this course?
237 |
238 | /// ends here ///
239 |
240 | //
241 |
--------------------------------------------------------------------------------
/chatbot.py:
--------------------------------------------------------------------------------
1 | #General Libraries
2 | import nltk
3 | from nltk.corpus import stopwords
4 | from nltk.tokenize import word_tokenize
5 | from nltk.stem import WordNetLemmatizer
6 | from nltk.corpus import wordnet as wn
7 | import re
8 | import aiml
9 | import subprocess
10 | import os
11 | import argparse
12 | from MyKernel import MyKernel
13 | from time import sleep
14 | #end of general libraries
15 |
16 | #Graphics library
17 | import kivy
18 | import random
19 | from kivy.app import App
20 | from kivy.uix.button import Button
21 | from kivy.uix.boxlayout import BoxLayout
22 | from kivy.uix.label import Label
23 | from kivy.uix.textinput import TextInput
24 | from kivy.core.window import Window
25 | from kivy.uix.widget import Widget
26 |
27 | from kivy.uix.popup import Popup
28 | from kivy.factory import Factory
29 | from kivy.properties import ObjectProperty
30 | from kivy.clock import Clock
31 | from kivy.uix.modalview import ModalView
32 | from kivy.properties import (StringProperty, ObjectProperty, OptionProperty,NumericProperty, ListProperty)
33 |
34 |
35 | import time, threading
36 | #end of Graphics libraries
37 |
38 | DEBUG = True
39 | SHOW_MATCHES = True
40 |
41 | def course_code(sentence):
42 | try:
43 | words = re.compile('\w+').findall(sentence)
44 | new_sentence = ""
45 | for index, word in enumerate(words):
46 | if (word == "cs") and (index < len(words)-1) and (words[index+1].isdigit()):
47 | new_sentence = new_sentence + word
48 | else:
49 | new_sentence = new_sentence + word + " "
50 | return new_sentence
51 | except:
52 | return sentence
53 |
54 | def remove_aiml_char(sentence):
55 | try:
56 | new_sentence = sentence.replace("_","")
57 | new_sentence = new_sentence.replace("*","")
58 | return new_sentence
59 | except:
60 | return sentence
61 |
62 | dict = {'NN': 'NOUN', 'JJ': 'ADJ'}
63 | dict['NNS'] = 'NOUN'
64 | dict['NNP'] = 'NOUN'
65 | dict['NNPS'] = 'NOUN'
66 | dict['PRP'] = 'NOUN'
67 | dict['PRP$'] = 'NOUN'
68 | dict['RB'] = 'ADV'
69 | dict['RBR'] = 'ADV'
70 | dict['RBS'] = 'ADV'
71 | dict['VB'] = 'VERB'
72 | dict['VBD'] = 'VERB'
73 | dict['VBG'] = 'VERB'
74 | dict['VBN'] = 'VERB'
75 | dict['VBP'] = 'VERB'
76 | dict['VBZ'] = 'VERB'
77 | dict['WRB'] = 'ADV'
78 |
79 | grade_codes = ["ap","aa","ab","bb","bc","cc","cd","dd","dx","fr"]
80 |
81 | BOT_INFO = {
82 | "name": "Amanda",
83 | "birthday": "July 5th 2017",
84 | "location": "Kanpur",
85 | "master": "I have no Master",
86 | "website":"follow me on twitter",
87 | "gender": "Female",
88 | "age": "20",
89 | "size": "",
90 | "religion": "Humanity",
91 | "party": "All night !"
92 | }
93 |
94 | k = MyKernel()
95 | k.learn("aiml/standard/std-startup.xml")
96 | k.respond("LOAD AIML B")
97 |
98 | for key,val in BOT_INFO.items():
99 | k.setBotPredicate(key,val)
100 |
101 | class PopupBox(ModalView):
102 | '''
103 | :Events:
104 | `on_open`:
105 | Fired when the Popup is opened.
106 | `on_dismiss`:
107 | Fired when the Popup is closed. If the callback returns True, the
108 | dismiss will be canceled.
109 | '''
110 |
111 | title = StringProperty('No title')
112 | '''String that represents the title of the popup.
113 |
114 | :attr:`title` is a :class:`~kivy.properties.StringProperty` and defaults to
115 | 'No title'.
116 | '''
117 |
118 | title_size = NumericProperty('14sp')
119 | '''Represents the font size of the popup title.
120 |
121 | .. versionadded:: 1.6.0
122 |
123 | :attr:`title_size` is a :class:`~kivy.properties.NumericProperty` and
124 | defaults to '14sp'.
125 | '''
126 |
127 | title_align = OptionProperty('left',
128 | options=['left', 'center', 'right', 'justify'])
129 | '''Horizontal alignment of the title.
130 |
131 | .. versionadded:: 1.9.0
132 |
133 | :attr:`title_align` is a :class:`~kivy.properties.OptionProperty` and
134 | defaults to 'left'. Available options are left, center, right and justify.
135 | '''
136 |
137 | title_font = StringProperty('Roboto')
138 | '''Font used to render the title text.
139 |
140 | .. versionadded:: 1.9.0
141 |
142 | :attr:`title_font` is a :class:`~kivy.properties.StringProperty` and
143 | defaults to 'Roboto'.
144 | '''
145 |
146 | content = ObjectProperty(None)
147 | '''Content of the popup that is displayed just under the title.
148 |
149 | :attr:`content` is an :class:`~kivy.properties.ObjectProperty` and defaults
150 | to None.
151 | '''
152 |
153 | title_color = ListProperty([1, 1, 1, 1])
154 | '''Color used by the Title.
155 |
156 | .. versionadded:: 1.8.0
157 |
158 | :attr:`title_color` is a :class:`~kivy.properties.ListProperty` and
159 | defaults to [1, 1, 1, 1].
160 | '''
161 |
162 | separator_color = ListProperty([47 / 255., 167 / 255., 212 / 255., 1.])
163 | '''Color used by the separator between title and content.
164 |
165 | .. versionadded:: 1.1.0
166 |
167 | :attr:`separator_color` is a :class:`~kivy.properties.ListProperty` and
168 | defaults to [47 / 255., 167 / 255., 212 / 255., 1.]
169 | '''
170 |
171 | separator_height = NumericProperty('2dp')
172 | '''Height of the separator.
173 |
174 | .. versionadded:: 1.1.0
175 |
176 | :attr:`separator_height` is a :class:`~kivy.properties.NumericProperty` and
177 | defaults to 2dp.
178 | '''
179 |
180 | # Internal properties used for graphical representation.
181 |
182 | _container = ObjectProperty(None)
183 |
184 | class MyApp(App):
185 | # layout
186 | def build(self):
187 | layout = BoxLayout(orientation='vertical')
188 | self.lbl1 = Label(text="Amanda: Welcome\n",size_hint=(1,0.86),color=(255,255,255,1),multiline=True,font_size=25,text_size=(1150,450),halign='left',valign='bottom')
189 | layout.add_widget(self.lbl1)
190 | layout2 = BoxLayout(size_hint=(1,0.14))
191 | self.txt1 = TextInput(text='',size_hint=(0.8,1),font_size=20)
192 | layout2.add_widget(self.txt1)
193 | self.btn1 = Button(text="Submit",size_hint=(0.2,1))
194 | self.btn1.bind(on_press=self.buttonClicked)
195 | # self.btn1.bind(on_press=self.open_popup)
196 | layout2.add_widget(self.btn1)
197 | layout.add_widget(layout2)
198 |
199 | return layout
200 |
201 | def show_popup(self):
202 | print "hi"
203 | content=Label(text="thinking")
204 | self.pop_up = Popup(title='Test popup',
205 | size_hint=(None, None), size=(256, 256),
206 | content=content, disabled=True)
207 | self.pop_up.open()
208 |
209 | # def open_popup(self,instance):
210 | # self.popup.open()
211 | # Clock.schedule_once(self.do_stuff(), 0)
212 |
213 | # def do_stuff(self):
214 | # self.buttonClicked()
215 | # self.popup.dismiss()
216 | # class myApp(App):
217 | # def build(self):
218 | # self.btn = Button(text='Run')
219 | # self.btn.bind(on_press = self.open_popup)
220 | # self.box = BoxLayout()
221 | # self.box.add_widget(self.btn)
222 | # self.popup = Popup(title='',content=Label(text='Loading'))
223 | # return self.box
224 |
225 | # def open_popup(self, instance):
226 | # self.popup.open()
227 | # t = threading.Thread(target=self.do_stuff).start()
228 |
229 | # def do_stuff(self):
230 | # self.box.clear_widgets()
231 | # self.box.add_widget(MyGraph())
232 | # self.popup.dismiss()
233 |
234 | ################################################################################
235 |
236 |
237 | # def __init__(self, **kwargs):
238 | # self._keyboard = Window.request_keyboard(self._keyboard_closed, self)
239 | # self._keyboard.bind(on_key_down=self._on_keyboard_down)
240 |
241 | # def _keyboard_closed(self):
242 | # self._keyboard.unbind(on_key_down=self._on_keyboard_down)
243 | # self._keyboard = None
244 |
245 | # def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
246 | # if keycode[1] == 'enter':
247 | # self.btn1.buttonClicked()
248 | # return True
249 |
250 | # button click function
251 | def dismiss_popup(self):
252 | print "closing"
253 | self.pop_up.dismiss()
254 |
255 | def buttonClicked(self,button):
256 | # mythread = threading.Thread(target=self.show_popup)
257 | # mythread.start()
258 | # mythread.join()
259 | # print "clicked"
260 | myinput = self.txt1.text
261 | self.lbl1.text = self.lbl1.text + "\nUser: "+myinput
262 | sentence = myinput.lower()
263 | sentence = course_code(sentence)
264 | stop_words = set(stopwords.words('english'))
265 |
266 | word_tokens = word_tokenize(sentence)
267 |
268 | filtered_sentence = [w for w in word_tokens if not w in stop_words]
269 | # print filtered_sentence
270 | temp = nltk.pos_tag(filtered_sentence)
271 | new_sentence = ""
272 | for i in temp:
273 | try:
274 | z = i[1]
275 | if (dict[z] != None):
276 | part_speech = dict[z]
277 | else:
278 | part_speech = 'NOUN'
279 |
280 | if(part_speech == 'NOUN'):
281 | word = wn.morphy(i[0],wn.NOUN)
282 | elif(part_speech == 'VERB'):
283 | word = wn.morphy(i[0],wn.VERB)
284 | elif(part_speech == 'ADV'):
285 | word = wn.morphy(i[0],wn.ADV)
286 | elif(part_speech == 'ADJ'):
287 | word = wn.morphy(i[0],wn.ADJ)
288 | word1 = wn.synsets(word)[0].lemmas()[0].name()
289 | if i[0] in grade_codes:
290 | word1 = i[0]
291 | except:
292 | word1 = i[0]
293 | new_sentence = new_sentence+" "+word1.lower()
294 | new_sentence = remove_aiml_char(new_sentence)
295 |
296 | #----------uncomment to debug----------------------
297 | if DEBUG:
298 | #printing first output
299 | matchedPattern = k.matchedPattern(myinput)
300 | response = k.respond(myinput)
301 | try:
302 | if SHOW_MATCHES:
303 | print "Matched Pattern: "
304 | print k.formatMatchedPattern(matchedPattern[0])
305 | pattern = k.getPredicate("topic",'_global')
306 | print "TOPIC:",pattern
307 | else:
308 | print "-------------------------"
309 | except:
310 | print "No match found"
311 | print "Normal Response: ",response
312 |
313 | # printing after processing
314 | print "--------------------------------"
315 | print "new_sentence :",new_sentence
316 | matchedPattern = k.matchedPattern(new_sentence)
317 | response = k.respond(new_sentence)
318 | try:
319 | if SHOW_MATCHES:
320 | print "Matched Pattern: "
321 | print k.formatMatchedPattern(matchedPattern[0])
322 | pattern = k.getPredicate("topic",'_global')
323 | print "TOPIC:",pattern
324 | else:
325 | print "-------------------------"
326 | except:
327 | print "No match found"
328 | print "New Response: ",response
329 |
330 | #--------------------------------------------------
331 | response = k.respond(myinput)
332 | response1 = k.respond(new_sentence)
333 | if response1 != "" and response1[0] == '$':
334 | response = response1[1:]
335 | # print response
336 | # mythread = threading.Thread(target=self.dismiss_popup)
337 | # mythread.start()
338 | # mythread.join()
339 | # self.show_popup()
340 | self.lbl1.text = self.lbl1.text + "\nAmanda: "+response+"\n"
341 | self.txt1.text = ""
342 |
343 | MyApp().run()
344 |
--------------------------------------------------------------------------------