Professional Documents
Culture Documents
1. Name *
2. Email ID *
ravikiran.konda9999@gmail.com
3. Contact Number *
9652580852
4. Write function to split paragraph into sentences. Do not use libraries for sentence
tokenization.
https://forms.office.com/Pages/ResponsePage.aspx?id=JFcuFV4pQUWLO5ts4aMZJzlLZC67UBJGnjlu-jxpKIFURDUyT0RTRTJHQUJSSDVUWDNEO… 1/4
10/4/21, 8:07 PM Data Science Intern_2nd round Assessment
def convert_into_sentances(data):
data= data.replace(".",".<stop>")
data= data.replace("?","?<stop>")
data= data.replace("!","!<stop>")
data= data.replace("<prd>",".")
sentences = data.split("<stop>")
sentences = sentences[:-1]
return sentences
convert_into_sentances()
5. Write a function to get n-gram from text. Print the output as highest frequency
first. In case 2 or more have equal occurrences, print in alphabetical order. Note -
Input could be either sentence or para. (Note - an N-gram is a sequence of N-
words. For eg. In this statement - "Apple and peach are fruits.", for a 2-gram, we
get "Apple and", "and peach", "peach are" and "are fruits." . A 3-gram would be
"Apple and peach", "and peach are", "peach are fruits.'.
print(n_grams)
https://forms.office.com/Pages/ResponsePage.aspx?id=JFcuFV4pQUWLO5ts4aMZJzlLZC67UBJGnjlu-jxpKIFURDUyT0RTRTJHQUJSSDVUWDNEO… 2/4
10/4/21, 8:07 PM Data Science Intern_2nd round Assessment
def Remove_duplicates(numbers):
rm_duplicates = []
rm_duplicates.append(num)
return rm_duplicates
Remove_duplicates(numbers)
#x =[numbers ]
# Remove_duplicate(x)
def find_fact():
fact =1
if (n < 0):
elif (n == 0):
else:
fact = fact * i
This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is not
responsible for the privacy or security practices of its customers, including those of this form owner. Never give out your
password.
https://forms.office.com/Pages/ResponsePage.aspx?id=JFcuFV4pQUWLO5ts4aMZJzlLZC67UBJGnjlu-jxpKIFURDUyT0RTRTJHQUJSSDVUWDNEO… 3/4
10/4/21, 8:07 PM Data Science Intern_2nd round Assessment
https://forms.office.com/Pages/ResponsePage.aspx?id=JFcuFV4pQUWLO5ts4aMZJzlLZC67UBJGnjlu-jxpKIFURDUyT0RTRTJHQUJSSDVUWDNEO… 4/4