[go: up one dir, main page]

0% found this document useful (0 votes)
150 views19 pages

Ai File HM

The document contains details of 11 practical assignments completed by a student for the Artificial Intelligence Lab subject. It includes the implementation of algorithms like Breadth First Search, Water Jug Problem, removing punctuations from strings, sorting sentences alphabetically, and games like Hangman and Tic-Tac-Toe using Python. For each practical, the student's details, aim, code snippets and output are documented. The faculty has provided remarks and signature against each practical assignment.

Uploaded by

nikunj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views19 pages

Ai File HM

The document contains details of 11 practical assignments completed by a student for the Artificial Intelligence Lab subject. It includes the implementation of algorithms like Breadth First Search, Water Jug Problem, removing punctuations from strings, sorting sentences alphabetically, and games like Hangman and Tic-Tac-Toe using Python. For each practical, the student's details, aim, code snippets and output are documented. The faculty has provided remarks and signature against each practical assignment.

Uploaded by

nikunj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

KRISHNA ENGINEERING COLLEGE

(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE (Artificial Intelligence)

INDEX
Student Roll no :- 2101611520031 Student name :-Nikunj kumar
Subject name :- Artificial Intelligence Lab Subject code :- KAI551

Impleme-
Practical Output Viva Total
Practical name Date ntation Signature
No. (5 MM) (5 MM) (20 MM)
(10 MM)
Write a python program to
1 implement Breadth First
Search Traversal.
Write a python program to
2 implement Water Jug
Problem.
Write a python program to
3 remove punctuations from the
given string.
Write a python program to sort
4 the sentence in alphabetical
order.

Write a program to implement


5 Hangman game using python.

Write a program to implement


6 Tic-Tac-Toe game using
python.
Write a python program to
remove stop words for a given
7 passage from a text file using
NLTK.
Write a python program to
implement stemming for a
8 given sentence using NLTK.

Write a python program to


POS (Parts of Speech)
9 tagging for the give sentence
using NLTK.
Write a python program to
10 implement Lemmatization
using NLTK.
Write a python program to for
11 Text Classification for the give
sentence using NLTK.

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 1
Name of the practical :- Implementing BFS Traversal
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to implement Breadth First Search Traversal.

About: Breadth-First Search explores a graph level by level, visiting all neighbors of a node
before moving on to the next depth, ensuring the shortest path is found efficiently.
CODE:
graph = { #creating dictionary
'a': ['f','c','b'],
'b': ['a','c','g'],
'c': ['a','b','d','e','f','g'],
'd': ['c','f','e','j'],
'e': ['c','d','g','j','k'],
'f': ['a','c','d'],
'g': ['b','c','e','k'],
'j': ['d','e','k'],
'k': ['e','g','j']
}

visited = [] # list for visited nodes


queue = [] #intialize queue

def bfs(visited, graph, node): #function for queue


visited.append(node) #add present node in visited list
queue.append(node) #add present node in queue list
while queue: # Creating loop to visiting each nodes (iterating till queue is not empty)
p = queue.pop(0)
print (p, end = " ")
for neighbour in graph[p]: #creating loop for neighour nodes.
if neighbour not in visited: #another iteration for neighours
visited.append(neighbour) # add present neighour nodes in visited list
queue.append(neighbour) #add present neighour node in queue list
print("This is the Breadth-First Search traversal. ")
bfs(visited, graph, 'a') # calling

OUTPUT:
This is the Breadth-First Search traversal.
a f c b d e g j k

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 2
Name of the practical :- implementing Water Jug Problem
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to implement Water Jug Problem.

About: The Water Jug Problem is like a puzzle where we have two jugs, one holding 5 units
and the other 2 units, and the goal is to measure exactly 1 unit of water. We can fill the jugs,
empty them, and pour water between them. The challenge is to find a sequence of these
operations to reach the desired amount, testing your problem-solving skills
.
CODE:
# Water Jug Problem
from collections import defaultdict

# Initial capacities of the jugs and the target amount to measure


jug1, jug2, aim = 5, 2, 1
# Dictionary to keep track of visited states.
visited = defaultdict(lambda: False)

# Function to solve the Water Jug Problem using recursion


def waterJugSolver(amt1, amt2):
# Check if the goal is reached
if (amt1 == aim and amt2 == 0) or (amt2 == aim and amt1 == 0):
print(amt1, amt2)
return True

# Check if the current state has been visited


if visited[(amt1, amt2)] == False:
print(amt1, amt2)
visited[(amt1, amt2)] = True
# Recursively exploring possible states
return (waterJugSolver(0, amt2) or
waterJugSolver(amt1, 0) or
waterJugSolver(jug1, amt2) or
waterJugSolver(amt1, jug2) or
waterJugSolver(amt1 + min(amt2, (jug1-amt1)),
amt2 - min(amt2, (jug1-amt1))) or
waterJugSolver(amt1 - min(amt1, (jug2-amt2)),
Faculty Remarks & Signature
KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

amt2 + min(amt1, (jug2-amt2))))


else:
return False

# Display the steps to solve the problem


print("Steps: ")
waterJugSolver(0, 0)

OUTPUT:
Steps:
0 0
5 0
5 2
0 2
2 0
2 2
4 0
4 2
5 1
0 1
True

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 3
Name of the practical :- Program to remove Punctuations
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim:Write a python program to remove punctuations from the given string.

About: Python program removes specified punctuations from a user-entered statement. It


uses a list of punctuations, including '@', "'", '-', '!', ':', ';', '/', and '#'. The program iterates
through each character in the input statement, excluding those punctuations, and then prints
the cleaned result

CODE:
# Write a Python program to remove punctuation
# Creating a list of common punctuation
punctuation_list = ['@', "'", '-', '!', ':', ';', '/', '#', '.', ',', '?', '$', '%', '^', '&', '*', '(', ')', '[', ']', '{', '}']

string = input("Enter your statement: ") # Taking input from the user
result = " " # Initializing the result
for i in string: # Iterating each character in the input string
# Checking if the character is not in the punctuation list
if i not in punctuation_list:
result = result + i
print(result) # Printing the result without punctuations

OUTPUT:
Enter your statement: Hello! , My name is Nikunj kumar #python
programming
Hello My name is Nikunj kumar python programming

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 4
Name of the practical :- Program to sort the sentence in alphabetical order
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to sort the sentence in alphabetical order.

About: Python program arranges a sentence in alphabetical order. It takes a sentence as


input, breaks it into words, sorts the words alphabetically, and then prints the sentence with
the words arranged in ascending order.
.
CODE:
# Write a Python program to arrange a sentence in alphabetical order

sentence = input("Enter your sentence: ") # Take input from the user
words = sentence.split() # Split the sentence into words
words.sort() # Sort the words alphabetically
result = " " # Initialize result
for i in words: # Iterate the sorted words and concatenate them
result = result + " " + i
print(result) # Print result

OUTPUT:
Enter your sentence: Python is an object oriented programming language
Python an is language object oriented programming

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 5
Name of the practical :- Implementing Hangman game using python
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a program to implement Hangman game using python.

About: Hangman is a classic word game where players guess letters to reveal a hidden word.
Each incorrect guess lost the number of attempts.

CODE:
import random
import string
# Generate a random list of words
def generate_random_words():
num_words = random.randint(5, 10) # Adjust the range as needed
min_length = 3
max_length = 6
words = [''.join(random.choice(string.ascii_lowercase) for _ in
range(random.randint(min_length, max_length))) for _ in range(num_words)]
return words
words = generate_random_words()
guessed_word = random.choice(words)
print("Secret word:", guessed_word)
# Generate a hint
hint = guessed_word[0] + guessed_word[-1]
print("Hint:", hint)
store_g = [] # Empty list to store correct letters
try_p = 4 # Attempts
name = input("Enter your name: ")
print(f"Welcome to the hangman game, {name}! You have only 4 attempts.")

for guess in range(try_p):


while True:
letter = input("Guess a letter: ")

if len(letter) == 1 and letter.isalpha():


break
else:
print("Oops! Please enter a single letter.")

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

if letter in guessed_word:
print("Yes! '{0}' is in the word.".format(letter))
store_g.append(letter)
else:
print("No! '{0}' is not in the word.".format(letter))
if guess == 2:
print()
clue_request = input("Would you like a clue? (yes/no): ")
if clue_request.lower().startswith('y'):
print("Clue: The first & last letter of the word is:", hint)
else:
print("You are very confident!")
print()
print("Now let's see what you have guessed so far. You have guessed:", len(store_g),
"letter(s) correctly.")
print("These letters are:", ', '.join(store_g))
word_guess = input("Guess the whole word: ")
if word_guess.lower() == guessed_word:
print("Congratulations! You guessed the word correctly.")
else:
print("Sorry! The correct answer was:", guessed_word)
print()
input("Please press enter to leave the game.")

OUTPUT:
Secret word: njo
Hint: no
Enter your name: Nikunj kumar
Welcome to the hangman game, Nikunj kumar! You have only 4 attempts.
Guess a letter: j
Yes! 'j' is in the word.
Guess a letter: t
No! 't' is not in the word.
Guess a letter: w
No! 'w' is not in the word.

Would you like a clue? (yes/no): y


Clue: The first & last letter of the word is: no
Guess a letter: k
No! 'k' is not in the word.

Now let's see what you have guessed so far. You have guessed: 1
letter(s) correctly.
These letters are: j
Guess the whole word: njo
Congratulations! You guessed the word correctly.

Please press enter to leave the game.

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 6
Name of the practical :- Implementing Tic-Tac-Toe game using python
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a program to implement Tic-Tac-Toe game using python.

About: Tic Tac Toe is a classic game played on a 3x3 grid. Two players take turns marking
Xs and Os, aiming to get three in a row horizontally, vertically, or diagonally. The first to
achieve this wins!.

CODE:
. import time
# Initialize board
board = {1: ' ', 2: ' ', 3: ' ',
4: ' ', 5: ' ', 6: ' ',
7: ' ', 8: ' ', 9: ' '}
# Initialize variables
count = 0 # counter to track the number of filled slots
winner = False # boolean to check if anyone won
play = True # boolean to check if the game should continue
tie = False # boolean to check if there is a tie
curr_player = '' # variable to store the current player identifier
player_details = [] # list to store player identifier and marker
# Helper functions
def get_player_details(curr_player):
"""Function to get player identifier and marker"""
if curr_player == 'A':
return ['B', 'O']
else:
return ['A', 'X']
def print_board():
"""Function to print the board"""
for i in board:
print(board[i], ' ', end='')
if i % 3 == 0:
print()
def win_game(marker, player_id):
"""Function to check for a winning combination"""
if (board[1] == board[2] == board[3] == marker or
Faculty Remarks & Signature
KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

board[4] == board[5] == board[6] == marker or


board[7] == board[8] == board[9] == marker or
board[1] == board[4] == board[7] == marker or
board[2] == board[5] == board[8] == marker or
board[3] == board[6] == board[9] == marker or
board[1] == board[5] == board[9] == marker or
board[3] == board[5] == board[7] == marker):
print_board()
time.sleep(1)
print("Player", player_id, "wins!")
return True
else:
return False
def insert_input(slot_num, marker):
"""Function for capturing user inputs"""
while board[slot_num] != ' ':
print("Spot taken, pick another number.")
slot_num = int(input())
board[slot_num] = marker
def play_again():
"""Function to check if the player wants to play again"""
print("Do you want to play again? (Y/N)")
play_again_input = input().upper()
if play_again_input == 'Y':
for z in board:
board[z] = ' '
return True
else:
print("Thanks for playing. See you next time!")
return False
# Main program
while play:
print_board()
player_details = get_player_details(curr_player)
curr_player = player_details[0]
print("Player {}: Enter a number between 1 and 9".format(curr_player))
input_slot = int(input())
# Inserting 'X' or 'O' in the desired spot
insert_input(input_slot, player_details[1])
count += 1
# Check if anybody won
winner = win_game(player_details[1], curr_player)
if count == 9 and not winner:
print("It's a tie!!")
tie = True
print_board()
# Check if players want to play again
Faculty Remarks & Signature
KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

if winner or tie:
play = play_again()
if play:
curr_player = ''
count = 0

OUTPUT:

Player A: Enter a number between 1 and 9


5

Player B: Enter a number between 1 and 9


2
O
X

Player A: Enter a number between 1 and 9


3
O X
X

Player B: Enter a number between 1 and 9


4
O X
O X

Player A: Enter a number between 1 and 9


5
Spot taken, pick another number.
7
O X
O X
X
Player A wins!
Do you want to play again? (Y/N)
n
Thanks for playing. See you next time!

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 7
Name of the practical :- Removing stop words for a passage using NLTK
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to remove stop words for a given passage from a text file
using NLTK.

About: Python program uses the Natural Language Toolkit (NLTK) to remove stop words
from a given passage. It first tokenizes the passage, converts it to lowercase, and then filters
out common English stop words. The result is the input passage without stop words.
.
CODE:
#write a python program to remove stop words for a given passage from a text file using
NLTK.
#common pre-processing step

import nltk
nltk.download('punkt')
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
passage= "write a python program to remove stop words for a given passage from a text file
using NLTK"
print(f"input passage: {passage}")
filtered_words=[]
tokens = word_tokenize(passage.lower())
print(f"tokens: {tokens}")
english_stopwords= stopwords.words('english')
for w in tokens:
if w not in english_stopwords:
filtered_words.append(w)

print("passage without stop words:"," ".join(filtered_words))

OUTPUT:

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

input passage: write a python program to remove stop words for a given
passage from a text file using NLTK
tokens: ['write', 'a', 'python', 'program', 'to', 'remove', 'stop',
'words', 'for', 'a', 'given', 'passage', 'from', 'a', 'text', 'file',
'using', 'nltk']
passage without stop words: write python program remove stop words
given passage text file using nltk
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data] Package punkt is already up-to-date!
[nltk_data] Downloading package stopwords to /root/nltk_data...
[nltk_data] Unzipping corpora/stopwords.zip.

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 8
Name of the practical :- Implement stemming for a given sentence using NLTK
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to implement stemming for a given sentence using NLTK

About: Python program uses the NLTK library to perform stemming on a list of words using
the Porter Stemmer. Stemming involves reducing words to their base or root form. In this
example, words like 'programming,' 'programmer,' and 'programs' are stemmed to their
common root, 'program
.
CODE:
# implementing stemming using NLTK
import nltk
from nltk.stem import PorterStemmer
ps= PorterStemmer()
words=["program","programming","programer","programs","programmed"]
print("{0:30}{1:20}".format("--word--","--stem--"))
for word in words:
print("{0:30}{1:20}".format(word,ps.stem(word)))

OUTPUT:
--word-- --stem--
program program
programming program
programer program
programs program
programmed program

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 9
Name of the practical :- program to POS tagging for given sentence using NLTK
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to Parts of Speech tagging for the give sentence using NLTK.

About: Python script uses the Natural Language Toolkit (NLTK) to enhance text analysis.
The program processes a sentence, removing common English stopwords, tokenizing the
remaining words, and finally tagging them with their parts of speech using NLTK's pos_tag
function. This helps in understanding the grammatical structure and meaning of each word in
the given sentence.
.
CODE:
#write a python program for parts of a speech tagging for the given sentance using NLTK.
import nltk
nltk.download('stopwords')
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
english_stop_words = set(stopwords.words('english'))
sentence = "write a python program for parts of a speech tagging for the given sentence using
NLTK."
tokens = word_tokenize(sentence)
words = [w for w in tokens if w.lower() not in english_stop_words]
tagged = nltk.pos_tag(words)
for i in tagged:
print(i)

OUTPUT:
('write', 'JJ')
('python', 'NN')
('program', 'NN')
('parts', 'NNS')
('speech', 'VBP')
('tagging', 'VBG')
('given', 'VBN')
('sentence', 'NN')
('using', 'VBG')
('NLTK', 'NNP')
('.', '.')
Faculty Remarks & Signature
KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 10
Name of the practical :- Implementing Lemmatization using using NLTK
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to implement Lemmatization using using NLTK.


About: Python program demonstrates lemmatization using NLTK, a technique that converts
words to their base form. It utilizes the WordNetLemmatizer from NLTK to process a list of
words. The output displays the original words alongside their corresponding lemmatized
forms, helping to simplify words to their base meaning for improved analysis.

CODE:
#Write a python program to implement Lemmatization using NLTK
#Lemmatization is the process of converting a word to its base form

import nltk
from nltk. stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize

lemmatizer = WordNetLemmatizer() #create an instance of the WordNetLemmatizer()

#Lemmatize_words = ["Improve", "Improving", "Improvements", "Improved", "Improver"]


lemmatize_words = ["program","programming","programer","programs", "programmed"]

print("{0:30}{1:20}".format("--Word--","--Lemmatized--"))
for word in lemmatize_words:
print("{0:30}{1:20}".format(word, lemmatizer.lemmatize (word)))

OUTPUT:
--Word-- --Lemmatized--
program program
programming programming
programer programer
programs program
programmed programmed

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

Practical :- 11
Name of the practical :- program for Text Classification using NLTK
Student Roll no :- 2101611520031
Student Name :- Nikunj kumar
Semester/Batch :- 5th semester (2021-2025)

Aim: Write a python program to for Text Classification for the give sentence using NLTK.

About: Python script showcases Text Classification using NLTK. It involves organizing a
given sentence into predefined categories or labels. The script uses the NLTK library to
process and analyze the text, allowing for automated categorization based on patterns and
features present in the language.

CODE:
import nltk
import random
nltk.download('movie_reviews')
from nltk.corpus import movie_reviews
documents = [(list(movie_reviews.words(fileid)), category) for category in
movie_reviews.categories() for fileid in movie_reviews.fileids(category)]
random.shuffle(documents)
print(documents[1])
all_words = []
for w in movie_reviews.words():
all_words.append(w.lower())
all_words = nltk.FreqDist(all_words)
print(all_words.most_common(15))
print(all_words["stupid"])

OUTPUT:
[nltk_data] Downloading package movie_reviews to /root/nltk_data...
[nltk_data] Unzipping corpora/movie_reviews.zip. (['this', 'well', '-
', 'conceived', 'but', 'ultra', 'sugary', 'coming', '-', 'of', '-',
'age', 'film', 'is', 'not', 'for', 'everyone', ',', 'and', 'i',
'include', 'myself', 'as', 'one', 'of', 'those', 'who', 'found', 'it',
'too', 'sappy', 'for', 'my', 'digestion', '.', 'joseph', 'cross', '(',
'joshua', 'beal', ')', 'is', 'a', '10', '-', 'year', '-', 'old', 'who',
'is', 'saddened', 'by', 'the', 'recent', 'loss', 'of', 'his',
'grandfather', '(', 'loggia', ')', 'to', 'bone', 'marrow', 'cancer',
'.', 'loggia', 'is', 'wonderful', 'in', 'relating', 'to', 'the',

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

'child', 'in', 'such', 'a', 'wholesome', 'manner', ',', 'it', 'almost',


'saves', 'this', 'film', 'from', 'drowning', 'in', 'syrup', '.', 'the',
'beals', 'are', 'like', 'a', 'sitcom', 'idyllic', 'family', ',',
'where', 'everyone', 'is', 'just', 'so', 'nice', 'and', 'affluent',
',', 'and', 'properly', 'religious', 'without', 'being', 'fanatical',
'.', 'the', 'beals', ',', 'the', 'father', '(', 'denis', 'leary', ')',
'and', 'his', 'wife', '(', 'dana', 'delany', ')', ',', 'are', 'both',
'successful', 'doctors', ';', 'julia', 'stiles', 'plays', 'joshua',
"'", 's', 'older', 'sister', ',', 'needling', 'her', 'younger',
'brother', 'but', 'also', 'showing', 'that', 'she', 'really', 'cares',
'about', 'him', '.', 'this', 'is', 'a', 'family', 'seemingly',
'conceived', 'in', 'heaven', ',', 'but', 'living', 'in', 'south',
'philadelphia', ',', 'sending', 'their', 'children', 'to', 'a', 'well',
'-', 'run', 'catholic', 'school', '.', 'joshua', ',', 'the',
'protagonist', 'and', 'the', 'narrator', 'of', 'this', 'yarn', ',',
'is', 'a', 'handsome', ',', 'sweet', ',', 'intelligent', ',',
'friendly', ',', 'and', 'endearing', 'child', ',', 'who', 'does',
'well', 'in', 'school', ',', 'relates', 'to', 'the', 'nuns', 'and',
'priests', ',', 'and', 'talks', 'politely', 'to', 'his', 'well', '-',
'meaning', 'parents', '.', 'all', 'this', 'mawkish', 'interplay',
'makes', 'it', 'almost', 'too', 'nauseating', 'to', 'watch', '.',
'the', 'plot', 'arises', 'when', 'joseph', 'has', 'a', 'problem',
'coping', 'with', 'the', 'death', 'of', 'his', 'beloved',
'grandfather', ',', 'who', 'promised', 'to', 'be', 'with', 'him',
'forever', '.', 'his', 'answer', 'is', 'to', 'search', 'for', 'god',
',', 'pretty', 'heady', 'stuff', 'for', 'a', 'youngster', 'his', 'age',
'to', 'do', ',', 'but', 'that', "'", 's', 'just', 'the', 'way', 'it',
'is', ',', 'sometimes', '.', 'this', 'search', 'for', 'god', 'takes',
'us', 'nowhere', 'because', ',', 'as', 'his', 'friend', 'david', '(',
'reifsnyder', ')', 'says', ',', 'where', 'can', 'you', 'look', 'for',
'him', 'if', 'he', 'doesn', "'", 't', 'exist', '.', 'now', ',', 'that',
"'", 's', 'a', 'smart', 'kid', '.', 'but', 'joseph', 'looks', 'for',
'him', 'in', 'the', 'usual', 'places', ',', 'and', 'what', 'better',
'place', 'than', 'to', 'start', 'in', 'the', 'parochial', 'school',
'he', 'attends', '.', 'one', 'of', 'his', 'teachers', 'is', 'the',
'kind', '-', 'hearted', 'sister', 'terry', '(', 'rosie', 'o', "'",
'donnell', ')', ',', 'who', 'wears', 'a', 'philly', 'baseball', 'hat',
'and', 'equates', 'the', 'jesus', 'stories', 'with', 'baseball', ',',
'making', 'him', 'the', 'clean', '-', 'up', 'hitter', ',', 'and', 'in',
'my', 'opinion', ',', 'if', 'she', 'wasn', "'", 't', 'a', 'big', 'tv',
'star', ',', 'would', 'have', 'a', 'vocation', 'as', 'a', 'parochial',
'school', 'teacher', ',', 'she', 'is', 'that', 'convincing', '.',
'throughout', 'the', 'film', ',', 'she', 'is', 'saved', 'from',
'answering', 'any', 'tough', '(', 'sic', '!', ')', 'question', 'about',
'god', 'by', 'the', 'bell', ',', 'as', 'it', 'rings', 'to', 'end',
'the', 'class', '.', 'nothing', 'much', 'happens', 'in', 'the',
'search', 'for', 'god', ',', 'there', 'is', 'no', 'parody', 'of',
'the', 'catholic', 'school', ';', 'though', 'a', 'visiting',
'cardinal', 'is', 'found', 'by', 'the', 'boy', 'not', 'to', 'be',
'able', 'to', 'talk', 'to', 'god', ',', 'but', 'this', 'is', 'gentle',
'stuff', ',', 'no', 'real', 'criticism', 'or', 'search', 'for', 'god',
'is', 'attempted', '.', 'what', 'comes', 'next', 'into', 'play', 'is',
'some', 'hollywood', 'hokum', ',', 'which', 'is', 'designed', 'not',
'to', 'upset', 'anyone', ',', 'as', 'joseph', 'has', 'a', 'reassuring',

Faculty Remarks & Signature


KRISHNA ENGINEERING COLLEGE
(Approved by AICTE & Affiliated to Dr. APJ Abdul Kalam Technical University (Formerly UPTU), Lucknow)
Department of CSE – AI

'encounter', 'with', 'a', 'real', ',', 'live', 'angel', ',', 'a',


'blond', 'little', 'boy', 'his', 'own', 'age', 'and', 'dressed',
'like', 'him', 'in', 'the', 'catholic', 'school', 'uniform', 'who',
'wears', 'the', 'innocuous', 'smile', 'of', 'a', 'goody', '-', 'goody',
'.', 'the', 'film', 'ends', 'as', 'this', 'angel', '(', '!', '!', '!',
')', 'tells', 'him', 'his', 'grandfather', 'is', 'all', 'right', '.',
'his', 'quest', 'is', 'ended', ',', 'as', 'apparently', 'angels',
'don', "'", 't', 'have', 'wings', 'and', 'are', 'approachable', ';',
'and', 'god', ',', 'well', ',', '.', '.', '.', 'maybe', 'that', "'",
's', 'for', 'another', 'film', 'down', 'the', 'road', '.', 'this',
'part', 'of', 'the', 'film', 'was', 'the', 'final', 'straw', 'for',
'me', ',', 'i', 'couldn', "'", 't', 'swallow', 'any', 'more', 'goo',
'.', 'as', 'this', 'film', 'flopped', 'commercially', ',', 'his',
'next', 'one', ',', 'the', 'sixth', 'sense', ',', 'pared', 'down',
'the', 'schmaltz', 'and', 'came', 'up', 'smelling', 'like', 'a',
'rose', '.', 'though', 'if', 'you', 'look', 'through', 'the',
'cleverness', 'of', 'both', 'scripts', ',', 'this', 'director', 'is',
'loaded', 'with', 'hokum', ',', 'all', 'he', 'has', 'learned', 'how',
'to', 'do', ',', 'is', 'hide', 'the', 'hokum', 'better', '.', 'well',
',', 'god', 'bless', 'him', ',', 'if', 'he', 'can', 'do', 'that', '.',
'this', 'is', 'a', 'nice', 'family', 'picture', 'and', 'there', 'is',
'room', 'for', 'it', 'in', 'hollywood', '.', 'it', "'", 's', 'just',
'too', 'bad', 'that', 'it', 'had', 'nothing', 'relevent', 'or', 'even',
'truthful', 'to', 'say', 'about', 'death', ',', 'children', 'in', 'a',
'parochial', 'elementary', 'school', ',', 'or', 'for', 'that',
'matter', ',', 'about', 'god', '.', 'and', 'that', 'family', 'of',
'his', ',', 'they', "'", 're', 'too', 'good', 'for', 'words', '.',
'yet', 'the', 'film', 'meant', 'well', 'and', 'its', 'benign',
'message', 'had', 'its', 'heart', 'in', 'the', 'right', 'place', '.',
'for', 'those', 'who', 'want', 'to', 'see', 'something', 'soft', ',',
'without', 'a', 'bite', 'to', 'it', ',', 'this', 'is', 'the', 'one',
'.'], 'neg') [(',', 77717), ('the', 76529), ('.', 65876), ('a', 38106),
('and', 35576), ('of', 34123), ('to', 31937), ("'", 30585), ('is',
25195), ('in', 21822), ('s', 18513), ('"', 17612), ('it', 16107),
('that', 15924), ('-', 15595)] 253

Faculty Remarks & Signature

You might also like