InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What do you mean by Lemmatization in NLP? |
|
Answer» The method of mapping all the various forms of a word to its base word (also called “lemma”) is known as Lemmatization. Although this MAY appear close to the definition of stemming, these are actually different. For instance, the word “better,” after stemming, remains the same. However, upon lemmatization, this should become “GOOD,”. Lemmatization NEEDS greater linguistic knowledge. Modelling and developing efficient lemmatizers still remains an open problem in NLP research. The application of a lemmatizer based on WORDNET from NLTK is shown in the code SNIPPET below: from nltk.stem import WordNetLemmatizerlemmatizer = WordnetLemmatizer()print(lemmatizer.lemmatize("better", pos="a")) #a is for adjective |
|
| 2. |
What do you mean by Stemming in NLP? |
|
Answer» When we remove the suffixes from a word so that the word is reduced to its base form, this process is called stemming. When the word is reduced to its base form, all the different VARIANTS of that word can be represented by the same form (e.g., “bird” and “birds” are both reduced to “bird”). We can do this by using a fixed set of rules. For instance: if a word ends in “-es,” we can remove the “-es”). Even though these rules might not really make sense as a LINGUISTICALLY correct base form, stemming is usually carried out to match user queries in search engines to relevant documents. And in text classification, is done to reduce the feature space to train our machine learning (ML) models. The code snippet given below depicts the way to use a well known NLP algorithm for stemming called Porter Stemmer using NLTK: from nltk.stem.porter IMPORT PorterStemmerstemmer = PorterStemmer()word1, word2 = "bikes", "revolution" print(stemmer.stem(word1), stemmer.stem(word2))This gives “bike” as the stemmed version for “bikes,” but “revolut” as the stemmed form of “revolution,” even though the latter is not linguistically correct. Even if this might not affect the performance of the search engine, a derivation of the correct linguistic form becomes useful in some other cases. This can be done by another process that is CLOSER to stemming, known as lemmatization. |
|
| 3. |
What are the steps involved in preprocessing data for NLP? |
|
Answer» Here are some common pre-processing steps used in NLP software:
|
|
| 4. |
What do you mean by Text Extraction and Cleanup? |
|
Answer» The PROCESS of extracting raw text from the INPUT data by getting rid of all the other non-textual information, such as markup, METADATA, etc., and CONVERTING the text to the required ENCODING format is called text extraction and cleanup. Usually, this depends on the format of available data for the required project. Following are the common ways used for Text Extraction in NLP:
|
|
| 5. |
How can data be obtained for NLP projects? |
|
Answer» There are multiple ways in which data can be OBTAINED for NLP projects. Some of them are as follows:
|
|
| 6. |
What is meant by data augmentation? What are some of the ways in which data augmentation can be done in NLP projects? |
|
Answer» NLP has some METHODS through which we can take a small DATASET and use that in order to create more DATA. This is called data augmentation. In this, we use LANGUAGE properties to create text that is syntactically similar to the source text data. Some of the ways in which data augmentation can be done in NLP projects are as follows:
|
|
| 7. |
How do Conversational Agents work? |
|
Answer» The following NLP components are USED in Conversational Agents:
|
|
| 8. |
What are the different approaches used to solve NLP problems? |
|
Answer» There are multiple approaches to SOLVING NLP problems. These USUALLY come in 3 categories:
|
|
| 9. |
What are some of the common NLP tasks? |
|
Answer» Some of the common tasks of NLP include:
Common NLP Tasks in order of Difficulty |
|
| 10. |
What are the stages in the lifecycle of a natural language processing (NLP) project? |
|
Answer» Following are the stages in the lifecycle of a natural language processing (NLP) project:
|
|