0% found this document useful (0 votes)
31 views17 pages

NLP 2025 Quiz

The document is a quiz titled 'NLP 2025 Quiz' that contains multiple-choice questions related to natural language processing, programming in Python, and linguistic concepts. It covers topics such as string manipulation, regular expressions, morphological analysis, and text vectorization methods. The quiz includes questions with varying point values and requires participants to select correct answers based on their knowledge of the subject matter.

Uploaded by

Amany Galal
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)
31 views17 pages

NLP 2025 Quiz

The document is a quiz titled 'NLP 2025 Quiz' that contains multiple-choice questions related to natural language processing, programming in Python, and linguistic concepts. It covers topics such as string manipulation, regular expressions, morphological analysis, and text vectorization methods. The quiz includes questions with varying point values and requires participants to select correct answers based on their knowledge of the subject matter.

Uploaded by

Amany Galal
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/ 17

NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

NLP 2025 Quiz


ahmed00muhammed0@gmail.com Switch accounts

* Indicates required question

Email *

Record ahmed00muhammed0@gmail.com as the email to be included with my


response

In order to get the length of the string in python, we use * 2 points

length() method

len() method

The pattern /[Cc]at|[Dd]og/ will match * 1 point

Cat

Dog

Both Cat and Dog

Either Cat or Dog

let "x" be a list of elements and "out" is a list of their squares, we want to * 3 points

create a list "y" that contains their cubes using list comprehension.

y = [item*3 for item in x]

y = [item for item in x]

y = [item**2 for item in x]

y = [item**3 for item in x]

1 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

After executing the following, check all the true choices. * 3 points

dict1 = {'Name': 'Zara', 'Year': 4, 'grade': '67'}

dict1 = {'Name': 'Nageeb'}

dict2 = {'grade': '67'}

dict2 = {'Name': 'Nageeb', 'Year': 4}

dict2 = {'Name': 'Zara', 'Year': 4}

Given all available modes in open() function, check the correct statements. * 3 points

'r' open for reading (default mode)

't' text mode (default)

'w' open for writing, truncating the �le �rst (default mode)

'a' open for writing, appending to the end of the �le if it exists

'b' binary mode

'+' open a disk �le for updating (reading and writing)

From your practice with "re" module, "\w" matches * 1 point

Any alphanumeric or space

Any word character (alphanumeric & underscore)

\d matches any decimal digit, this is equivalent to the class [0-9] * 1 point

True

False

2 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

In linguistic morphology, _____________ is the process for reducing inflected * 1 point

words to their root form

B. Text-Proo�ng

D. Stemming

A. Rooting

C. Both Rooting & Stemming

In linguistic morphology, _____________ is the process for reducing inflected * 1 point

words to their root form.

c) Text-Proo�ng

b) Rooting

d) Both a & b

a) Stemming

The output of the stemmer is always a valid word. * 1 point

True

False

Choose all true choices about the Bag of Words * 1 point

omits grammar and word order.

is a representation model used to simplify the contents of a selection of text.

is interested in the number of occurrences of words within the text.

does a good job in making sense of text data.

Which represents the concatenation of letters that make up the actual * 1 point

spelling of the word?

Surface level

Lexical level

All of the above

3 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

gupp(y|ies) matches * 1 point

D) either A) or B)

B) guppy OR ies

A) guppy OR guppies

C) both A) and B)

The following invocation of the match method will return * 3 points

None

Match object from re module

A step which splits longer strings of text into smaller pieces, or tokens is * 1 point

called

Normalization

Tokenization

In order to get the character set ONLY from the following response header * 3 points

we can type
You can open the image in a new tab if it's not clear.

resp.headers.get_content_charset()

resp.headers.get('content-type')

resp.headers.items()

resp.headers.get('content-type').split('=')[0]

resp.headers.get('content-type').split('=')[1]

4 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

In order to access the web in python and get a text out of it, we could * 2 points

use____________ modules. (Choose all the correct answers)

crawler4j

urllib

coreNLP

BeautifulSoup

pyGad

pattern

requests

scrapy

One of the main challenge/s of NLP is * 1 point

Handling Tokenization

Handling Ambiguity of Sentences

Handling POS-Tagging

All of the above

Which of the following includes major tasks of NLP? * 1 point

A. Machine Translation

B. Automatic Summarization

C. Discourse Analysis

D. All of the above

‫* اﻟﺴﻜﺸﻦ‬

section 1

5 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

If we run the following code, the variable "var" will be * 2 points

a list of hashtags

a list that contains a single string object

a �lter object

/beg.n/ matches * 1 point

begin

beg’n

begun

any character between beg and n

All of the above

What is Morphological Segmentation? * 1 point

a) Does Discourse Analysis

b) Breaks words into individual morphemes and identify the class of the morphemes

c) Is an extension of propositional logic

d) None of the mentioned

One-Hot Encoding Method is better used for * 2 points

Modeling more complex relationships

Bayesian models

Neural networks

General purpose

Syllable is the part of the word that never changes even when * 1 point

morphologically inflected.

True

False

6 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Syllables are the smallest meaningful spoken units of language. * 1 point

True

False

Morphology is * 1 point

The study of linguistic sounds and their relations to written words

The study of the structural relationships among words in a sentence

The study of internal structures of words/composition of words

Morphology * 1 point

Analyzes how phrases are formed by smaller phrases and words.

Analyzes how words are formed from minimal units of meaning, or morphemes, e.g.,
dogs= dog+s.

Regular expression is * 1 point

a language for specifying text search strings

doing backtracking to match the string

Check all the true statements about the following code snippet * 1 point

csv_reader() function will be able to handle �les larger than memory size

csv_reader() function will throw MemoryError if the �le is larger than memory size

getcwd() function in os module is used for * 2 points

Get the current working directory

Get the parent directory of a path

Get the parent directory of the current directory

7 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Ambiguity in natural language could be * 1 point

Lexical

Syntactic

Semantic

Metonymy

All of the above

Discourse is a linguistic unit that is larger than a single sentence (context) * 1 point

True

False

After running the following commands, Mark the correct from the following * 2 points

options.

dict1 will be {'Name': 'Nageeb'}

dict2 will be {'Name': 'Nageeb'}

dict1 will be {'Name': 'Nageeb', 'Year': 4}

dict2 will be {'Name': 'Nageeb', 'Year': 4}

dict1 will be {'Name': 'Zara', 'Year': 4}

dict2 will be {'Name': 'Zara', 'Year': 4}

Stem is the root of the word together with any derivational affixes to which * 1 point

inflectional affixes are added.

True

False

8 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Opening a file with "the with statement" does the following * 3 points

simpli�es exception handling

No need to invoke close() method after getting done with the �le

encapsulating common preparation and cleanup tasks

If we run the following code, the variable "out" will be * 2 points

[['Rafaat', 'omaran'], ['Raheem', 'ahmed'], ['Fawzy', 'mostafa']]

['Rafaat', 'omaran'], ['Raheem', 'ahmed'], ['Fawzy', 'mostafa']

['Rafaat', 'omaran', 'Raheem', 'ahmed', 'Fawzy', 'mostafa']

Given a list of numbers, use map function and lambda expressions to * 3 points

create a list of their squares.

map(lambda var: var**2,seq)

list(map(lambda var: var**2,seq))

list(map(lambda var: var*2,seq))

list(map(lambda var: var,seq))

If we run the following code, the variable "out" will be * 2 points

[['Rafaat', 'omaran'], ['Raheem', 'ahmed'], ['Fawzy', 'mostafa']]

['Rafaat', 'omaran', 'Raheem', 'ahmed', 'Fawzy', 'mostafa']

['Rafaat', 'omaran'], ['Raheem', 'ahmed'], ['Fawzy', 'mostafa']

9 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Suppose you are doing bag-of-words text classification on a document. The * 1 point

raw input is a single string containing the text of the entire document.
Choose all possible sentences to describe the pipeline to go from the raw
input to a feature vector.

Tokenization

Training a Naive Bayes model

Normalizing the text

Indexing/word counting

In order to use TF-IDF vectorization method in sklearn we use ______ class * 2 points

Binarizer

T�dfVectorizer

CountVectorizer

Which of the following is Object-oriented programming paradigm? * 2 points

imperative paradigm

declarative paradigm

In the English language inflection morphemes can be * 1 point

Pre�xes, su�xes and in�xes

Circum�xes

Pre�xes only

Pre�xes and su�xes

su�xes only

How is the word "changing" lematized? * 1 point

chan

changin

change

chang

10 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Write a regular expression to represent a laughing machine. The laughing * 3 points

machine should recognize sequences of ‫ ﻫﻰ‬,‫ ﻫﻮ‬and ‫ ﻫﺎ‬followed by !. It


should also recognize any mix of them. Assume separate letters; i.e. ‫و‬, ‫ ا‬,‫ﻫـ‬
‫ ى‬, the symbol "!" takes the machine to a final state.

$+(![‫ه]وي‬:?)^

NLP is concerned with the interactions between computers and human * 1 point

(natural) languages.

False

True

A regexp is NOT a "true" regular expression as long as there is a "\1" (or any * 1 point

number) in the regexp. By regexp, I mean the notion supported by modern


programming languages.

True

False

Lexical level is the representation of the actual spelling of the final word. * 1 point

True

False

From your practice with (RE) module, "\w" matches * 5 points

Any alphanumeric or space

Any word character (alphanumeric & underscore)

Frequency Vectorization Method is better used for * 2 points

Bayesian models

General purpose

Neural networks

Modeling more complex relationships

11 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

\[Ww]oodchuncks?\ will match woodchuncks, Woodchunks, and * 1 point

woodchunck

True

False

‫ﻼ ﺑﺎﻟﻠﻐﺔ اﻟﻌﺮﺑﻴﺔ‬
ً ‫* اﻹﺳﻢ ﻛﺎﻣ‬

‫أﺣﻤﺪ ﻣﺤﻤﺪ ﻋﺒﺪاﻟﻌﺎﻃﻲ ﻣﺤﻤﺪ‬

Distributed Representations Vectorization Methods are better used for * 2 points

General purpose

Neural networks

Bayesian models

Modeling more complex relationships

Text Vectorization is used * 3 points

For reduction of representation space.

To transform our documents into vector representations.

Before applying machine learning algorithm.

/[wh]ood/ will match whood * 1 point

True

False

He lifted the beetle with red cap. contain which type of ambiguity ? * 1 point

A. Lexical ambiguity

D. Syntax Level ambiguity

C. None of the Above

B. Referential ambiguity

12 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

guppy|ies matches * 1 point

D) either A) or B)

A) guppy OR guppies

C) both A) and B)

B) guppy OR ies

Discourse is a linguistic unit that is larger than a single sentence that * 1 point

represents the context of the text.

True

False

If we run the following code, the variable "out" will be * 2 points

a map object that contains 10, 20, 30

a list of 30,20

a map object that contains 30, 20

a map object that contains 30, 20, 10

Check all true choices about sentence segmentation * 1 point

Sentence tokenization methods work by building a binary classi�er (based on a


sequence of rules or on machine learning).

Sentence segmentation is another important step in text processing.

Segmenting a text into sentences are punctuation, like periods, question marks,
exclamation points.

Sentence segmentation is not the same as sentence tokenization.

os.listdir() will get you only files that's in a directory * 1 point

True

False

13 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

‫* اﻟﺮﻗﻢ اﻷﻛﺎدﻳﻨﻤﻲ‬

4210037

Syllables are often considered the phonological "building blocks" of words. * 1 point

True

False

Which from the following is considered to be a "Natural Language * 1 point

Processing Library"?

SpaCy

Gensim

Scrapy

Requests

Pattern

NLTK

Pandas

Crawler4j

Urllib

BeautifulSoup

TextBlob

CoreNLP

Flask

Write a regular expression that matches the marks in the following text * 4 points

"My degree in NLP course is 100 and my degree in databases course is


99", the regular expression should matches both "100" and "99" from this
text.

\d+ (or [0-9]+)

14 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

What is Machine Translation? * 1 point

c) Converts any human language to English

b) Converts human language to machine language

a) Converts one human language to another

d) Converts Machine language to human language

TF–IDF Vectorization Method is good for * 2 points

Modeling more complex relationships

Neural networks

Bayesian models

General purpose

Natural language is ______ * 1 point

ambiguous

a collection of morphemes

a sequence of lexemes

Flush() method of the file object do the following * 3 points

Calls close() internally

Writes buffer content to the �le

Clears the buffer without writing the content to the �le

In order to invoke nltk.word_tokenize() * 2 points

We need to download "wordnet" �rst

No need to download any packages

We need to download "punkt" �rst

15 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

A process step generally refers to a series of related tasks meant to put all * 1 point

text on a level playing field: converting all text to the same case (upper or
lower), removing punctuation, expanding contractions, converting numbers
to their word equivalents, and so on (puts all words on equal footing, and
allows processing to proceed uniformly) is called

Tokenization

Normalization

Given a list of numbers, create the corresponding list that has only even * 4 points

numbers of the input. (P.S. Check all true answers)

list(�lter(lambda item: item%2 != 0,seq))

�lter(lambda item: item%2 == 0,seq)

list(�lter(lambda item: item%2 == 0,seq))

[item for item in seq if item%2 == 0]

[item for item in seq if item%2 != 0]

Phonetics is the study of the structural relationships among words in a * 1 point

sentence.

True

False

\a{4,}h will match ah or aaaah * 1 point

True

False

16 of 17 4/21/25, 9:11 PM
NLP 2025 Quiz https://docs.google.com/forms/d/e/1FAIpQLSeNs0b6FE8BEghKsQa7Lu...

Check all true statements about the following code snippet * 2 points

stop words are returning as a list in NLTK, so we convert it to a set

new_tokens is a list of remaining words after �ltering stop words

This code represent stop words removal in Spacy

This code represent stop words removal in NLTK

The following code represents one of ways to vectorizing the text in NLTK * 1 point

library, which is

Frequency

Word2Vec

Distributed representations

Doc2Vec

TF–IDF

One-hot

Check of the following any lines that returns a "Connection object", given * 1 point

that all the required modules are included.

sqlite3.connect('test.db')

MySQLdb.connect('test.db')

sqlite3.connect('test.db', user='maria', password='python')

MySQLdb.connect('hostname', user='maria', password='python')

Page 1 of 1

Never submit passwords through Google Forms.

This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

Does this form look suspicious? Report

Forms

17 of 17 4/21/25, 9:11 PM

You might also like