美文网首页
ASSIGNMENTS

ASSIGNMENTS

作者: 山猪打不过家猪 | 来源:发表于2023-04-24 06:26 被阅读0次

    QUIZ 1

    1. Why is NLP considered a "hard" problem to solve?
    A. Natural language knowledge representation is context based.
    B. Knowledge represented as numbers can is ambiguous while that represented as natural language is not.
    C. Natural language occupies a lot of space on the storage device.
    D. NLP is multidisciplinary in nature
    E. There is a very large amount of data stored as natural language.
    
    A ,D
    
    1. Repetitions, Synonyms and coreferences are tools used for:
    A. Joining parts of a sentence.
    B.Expressing multiple meanings.
    C.Coherence
    
    - C
    
    1. "The river's bank was breached by the flood" and "My loan got approved by the bank" are sentences emulating _____________ ambiguities.
    semantic, Semantic
    
    1. Which one/ones of the following explains the difference between text mining and natural language processing (NLP)?
    A.  They are the same thing so there is no difference.
    B. NLP uses algorithms and results developed by Text Mining.
    C. Text mininig is applied while NLP is theoretical.
    D. Text Mining uses algorithms and results developed by NLP
    
    C,D
    
    1. Which one/s of the following is true about python in the context of this course.
    A. Its an IDE.
    B. Its a simplified programming language with an abundance of data andt text processing libraries.
    C. It is a programming language extensively used in the commercial sector.
    D. Its a programming language for starters.
    E. Its a type of snake which will be studied in detail in this course.
    F. Its the only programming language that can be used to do NLP.
    
    B,C
    
    1. The subtle difference between the words play, player, played playing is described by which of the following terms?
    semantics
    syntactics
    phonetics
    morphology
    
    morphology
    
    1. Which one of the following is not a reason for studying Text Mining?
    A. Take advantage of vast amount of information encoded as numerical data.
    B. Take advantage of the vast amount of information encoded as texts, both online and offline.
    C. To interface with organised information in databases.
    
    A
    
    1. What are semantic ambiguities?
    A. Different words with the same spelling
    B. Words with different spelling.
    C. Words with more than one sense
    D. Polysemous words. #多义词
    E. Different functions of a word, or the POS tag.
    
    A,C,D
    
    1. Which one/s of the following is true about POS tagging and parsing.
    A. Parsing and POS tagging are mutually dependent on each other.
    B. Parsing is a higher level task compared to POS tagging.
    C. POS tagging is based on Parsing.
    D. POS tagging and Parsing are essencially the same thing.
    E. Parsing is based on POS tagging.
    
    B,E 
    
    1. What is the significance of "natural" in natural language processing?
    Its language as produced by humans.
    
    1. What is the difference between Text Mining and Natural Language Processing?
    A. NLP includes numerical data as well while TM doesn't.
    B. They are the same thing.
    C. TM involves numerical data as well while NLP doesn't.
    D. TM is answering an objective question, while NLP is deals with essential text processing algorithms.
    
    D
    
    1. Which one/ones of the following describe syntax of a language?
    A. How words are put together to form correct sentences
    B. How meaning is constructed from words.
    C. How words are vocalised. 
    D. How words are constructed
    
    A.
    

    QUIZ 2

    1. Which one/s of the following is true about inflectional and derivational morphology?
    A. The words "play", "player", "played" is and example of inflectional morphology where the words remain in the verb class.
    B. In derivational morphology, the class of the word remains the same.
    C. In derivational morphology the class of the word may or may not change.
    D. In inflectional morphology the class of the word does not change.
    E. The words "play", "player", "played" is and example of inflectional morphology where the words remain in the noun class.
    F. In inflectional morphology, the class of the word may change as long as the stem of the word remains the same.
    
    A,D
    

    2.Consider the sentence below:
    "I was sitting on the park bench drinking water from a .................."
    In order to predict the next word after "a" which of the following conditional probabilities can be used?

    A. P(bottle| I sitting park bench drinking)
    B. P(glass | park bench drinking)
    C. P(glass | park bench drinking water from a)
    D. P(bottle | water from a)
    
    C,D
    

    3.Which one/s of the following is not a valid dimension reduction strategy for language models.

    A. Removing all nouns.
    B. Using just singular forms of words.
    C. Using just word Lemma. 
    D. Removing all adjectives.
    E. Using words Stems. 
    
    A,D
    

    4.Which one/s of the following is true about morphology?

    A. It is used in some form in all languages.
    B. It is a tool used to change the meaning of a word slightly by adding suffixes and prefixes.
    C. It is used relevant only in the English language
    D. It can modify a word by adding characters in the middle of a word.
    
    A,B
    
    1. Which one/s is an example of a situation when a word could be different than a token? (名词不是)
    A. For a word such as "New Zealand"
    B. For words such as "Ministry of Health"
    C. For a word such as "pre-processing"
    D. For a word such as "couldn't"
    
    C,D
    
    1. Which one/s of the following describes n-gram language model?
    A. It is a model based solely on tokens.
    B. It is a model based on basic units of a language, for English, it is the alphabets.
    C. It is a model in which clusters of words are extracted and these clusters are counted and used in the model.
    D. It is a model based on documents as a whole.
    E. It is a model based on documents as a whole.
    
    D
    
    1. Which one/s of the following is true about regular and irregular words?
    A. The past tense of "go" is "went" is an example of regular verb.
    B. The plural of "fish" is also  "fish " is an example of irregular noun.
    C. The plural of "car" is "car" is an example of irregular noun.
    D. Regular words follow the general rules and irregular ones don't.
    E. The past tense of "play" is "played" is an example of irregular verb.
    
    D
    

    QUIZ 3

    1.Which one/s of the following is true about the dependency parsed tree?


    image.png
    A. Spoon is a prep object of "John"
    B. Spoon is a prep object of "with".
    C."ate" is the main ver
    D. "with" is a prep object of "icecream"
    E. "icecream" is the subject of the clause.
    
    C.
    
    1. Which one/s of the following is part of a possilbe output if the following method is called. on the sentence " I went to town on a bicycle"
    import nltk
    import spacy
    
    def printDocDep(doc):
      for token in doc:
        print("{0}/{1} <--{2}-- {3}/{4}".format(token.text, token.tag_, token.dep_, token.head.text, token.head.tag_))
    
    nlp = spacy.load('en_core_web_sm')
    doc = nlp('I went to town on a bicycle')
    printDocDep(doc)
    
    A. a/DT <--det-- bicycle/NN
    B. town/NN <--VBD-- to/IN
    C. bicycle/VBD <--pobj-- on/NN
    D. a/NN <--det-- bicycle/VBD
    E. I/PRP <--nsubj-- went/VBD
    
    A,E 
    
    1. Which one/s of the following are true about false negatives?
    A. Are data points from the category which has been incorrectly identified by the machine.
    B. Are data points from the category which has not been identified into the category by the machine.
    C. Are data points from a category which has been incorrectly identified.
    D. Are data points from a category which had been incorrectly identified into the category.
    
    A,B 
    
    1. Is the following statement True or False
    A Token in a sentence has a unique POS tag.
    - True
    
    1. Which one/s are true about closed and open class words?
    A. Adjectives are a closed class
    B. Pronouns are a closed class
    C. It is difficult to POS tag open class words.
    D. Open Class words are productive thats why it "open"
    E. It is easy to POS tag closed class words.
    F. Adjectives are an open class.
    
    A,B,C,D,F
    
    1. According to the confusion matrix below which one/s of the following statements is true.(混淆矩阵)


      image.png
    A. The machine is good at identifying the category VB.
    B.The machine easiy confuses the NN as TO.
    C. The machine easitly confuses VB as TO.
    D. The machine is not good at identifying between the NN and TO categories.
    
    A,D
    
    1. Kappa statistic is used for:
    A. Is used to compare agreement between 2 machines.
    B. Express the level of agreement usually by human evaluators.
    C. Is used to compare human and machine agreement.
    D. Is used to compare agreement between machines from different categories.
    
    B
    
    1. Which one/s of the following is true about Dependency grammer?
    A. It defines binary relations between tokens.
    B. Dependency grammer framework defines relations between noun phrases.
    C.The nodes consists for the tokens.
    D. The relations in a dependency grammer framework is same as CFG grammer
    
    A,C 
    
    1. Which one/s of the following is NOT part of CFG?
    A.Rules
    B.Terminals
    C.POS tags
    D.Non-terminals
    
    C.
    
    1. Use the following confusion matrix to compute the Recall value for TO.


      image.png
    蓝色/(红色+蓝色)=312/722=0.43
    

    11.Which one/s of the following is true about Treebank grammer?

    A.Tree bank grammer covers all possible types of sentences.
    B.It might not cover all possible types of sentences
    C.Treebank grammer consistes of rules defined by  humans.
    D.The rules in Treebank grammer covers all the sentences in the corpus from which the the rules are derived.
    
    B,D
    
    1. When the code below is run, the output is : [bus, into, with]
      Which one/s of the following is true about the code and the output.
     from spacy import displacy
    from spacy.symbols import nsubj, VERB, dobj, pobj, NOUN,PROPN, PERSON
    
    doc = nlp("The bus drove into the pole with speed")
    for token in doc:   
        if token.dep == nsubj and token.head.pos == VERB:
          print([child for child in token.head.children]) # Tree navigation
    
    A. The main verb has 2 children and one subject.
    B.The main verb's head node has 3 children
    C.The main verb has 3 children.
    D.Th main verb has 3 children, out of which one of them is the subject.
    E.The main verb should have 4 children, but it outputs 3 meaning one of them has been missed by the model.
    
    B,C
    
    1. Which one/s of the following is true about Named Entity Recognition?
    A.It is the process of identifying different types of entities in texts.
    B.It the process of assigning names to all the tokens in the text.
    C.It is the process of identifying POS tags in text.
    D.It can be used to identify people.
    
    A,D
    

    14.What is the main difference between Treebank grammer and CFG?

    A.Treebank and CFG are both recursive but the recursions in Treebank are simpler.
    B.Treebank grammar is recursive hence simpler.
    C.Treebank grammer is not recursive, hence simpler
    
    C
    

    15.Which one/s is true about True positives.

    A.Are data points from the category which are not identified into the category by the machine. 
    B.Are identified data points in a category which has also been identified in the category by humans.
    C. Are identified data points in the category which are correctly identified by the machine.
    
    1. Which one/s of the following is true about POS tagging?
    A.Its the process of classifying each token in text into a given set of tags.
    B. Its the process of assigning the syntactical function to a particular instance of a token in text.
    C.Its the process of classifying all the words in a language vocabulary into a given set of tags.
    D.Its the process of assigning the syntactical structure to text.
    E.It is the process of ranking tokens in text.
    
    A,B
    

    17.What is Chunking?

    A.Its the process of identifying verb phrases
    B.Is the process of identifying clauses in  sentences.
    C.Its the process of identifying the Dependency grammar tree for a sentence.
    D. Its the process of identifying noun phrases
    
    D
    

    18.A student used the following code and pattern matcher in an attempt to extract clause patterns of the form <pnoun> <verb> <noun>.
    However he got the following output with the empty array for the result.
    Johnny / PROPN Jumped / VERB in / ADP the / DET river / NOUN []
    Which one/s of the following could be the possible reason for this?

    A.If the sentence being tested was "Johnny jumped river", the output would be correct.
    
    B.The defined pattern is not present in the sentence being tested.
    

    QUIZ 4

    1. A corpus has 1,000 documents with 50,000 terms. Use the following diagram from lectures in conjunction with the corpus information to determine which one/s of the following is true.(m=terms,n=documents,token>=5000)


      image.png
    A.The value m in the diagram is equal to 50,000
    B.The value m in the diagram is >= 50,000
    C.The number of tokens in the corpus can be 50,000
    D.The value n in the diagram is equal to 50,000.
    E.The value n in the diagram is equal to 1000.
    F.The corpus information as provided is impossible, as we cannot have 50,000 terms in 1,000 documents.
    G.Number of tokens in the corpus >= 50,000
    H.The number of tokens in the corpus is equal to 1,000 multiplied by 50,000.
    
    A,C,E,G
    

    2.One of the simplest vectorisation techniques is to use the raw term frequency. Which one/s of the following is true about term frequency?

    A.A document which as a term 100 times more is not 100 times more 
    B.A frequently occuring term has more information content than a rare term.
    C.A document which a term 100 times more is necessarily 100 times more relevant.
    D.Rare terms are more informative than frequent terms.
    
    A,D
    

    3.Which one/ones of the following is true about the TF-IDF weighting scheme?

    A. It increases with the frequency of the term as well as the rarity of the term.
    B. It decreases with the rarity of the term but increases with the frequency of the term.
    C.It decreases with both the rarity of the term as well as the frequency of the term.
    D.It decreases with the frequency of the term but increases with the rarity of the term.
    
    A
    

    4.Which one/s of the following can be used to calculate TF-IDF values?

    A.tf-idft,d = log(1+ tft,d) X log(N/dft)
    B.tf-idft,d = tft,d X log(N/dft + 1)
    C.tf-idft,d = tft,d X log(N + 1/dft)
    D.tf-idft,d = ln(1+ tft,d) X ln(N/dft)
    E.tf-idft,d = tft,d X ln(N/dft)
    
    A,D,E
    

    5.Which one/s of the following is true about BOW model

    A.BOW ignores the order of words in a sentence.
    B.BOW model will not be able to capture plural and singular words.
    C.BOW model is not able to capture stop words.
    D.The sentences "The dog bit the man" and "The man bit the dog" would have approximately the same model.
    E.The sentences "The dog bit the man" and "The man bit the dog" would have exactly the same model.
    
    A,E
    

    6.Use the following 3 document, 4 term corpus and the Euclidean formula to to calculate the Euclidean Distances between Doc 1/Doc2 and Doc1/Doc3. Choose the option that indicates the values in the order: difference between Doc 1/Doc2 and difference between Doc1/Doc3


    image.png
    100 and 38
    74 and 100
    52.10 and 29.46
    38 and 100
    
    1. Consider the following corpus of 3 documents and 4 terms..


      image.png

      What is the value of inverse document frequency using the formula log(N/dft) for the term "insurance" for Doc 3?

    总共3个文档,其中insurance的有2个则计算公式是:
    log(3/2) = 0.176 = 0.18
    
    1. For the following document matrix what would be the term frequency vector for document 2?


      image.png
    4
    33
    33
    0
    
    1. Which one/s of the following is not a dimension reduction strategy?
    A.Stemming
    B.tokenisation
    C.POS tagging
    
    B,C
    
    1. Which one/s of the following is true about vector space model of a document?
    A.It’s the representation of the document with a data structure.
    B.It’s the POS representation of a document.
    C.It’s the numerical vector representation of a document.
    D.It’s the representation of the document with the tokens.
    E.It’s the symbolic representation of a document.
    
    A,C
    

    QUIZ 5

    1.Word Embedding can be used to rank documents.

    T
    
    1. Word Embedding CANNOT be used to compute the difference between two documents.
    FALSE
    
    1. In the code below how many dimension embedded matrix will be generated?


      image.png
    300
    
    1. Use the following code snippet in this question. What is the purpose of the code from lines 27 to 29
    A.It defines the input layer input and the hidder layers of the neural network
    B.It defines the output layer and the hidden layers.
    C.It defines only the hidden layers.
    D.It defines only the input layer.
    
    A
    
    1. Use the following code snippet for this question. For a 10 word vocabulary, how many dimensions would the vector y_label on line 23 be?


      image.png
    10 
    10个单词就是10维度,88个单词就是88个
    
    1. Use the code snippet below for this question. What is the purpose of the code online 36?
    A.It computes the error for each of the inputs and finds the mean.
    B.It computes the error for a single input.
    C.It sums the ouput for each of the inputs.
    D.It sums the weights for each of the neurons.
    E.It sums the inputs and finds the mean.
    
    A
    
    1. Consider the following 3 dimensional representation for the terms plant, tree shrub.

    plant tree Shrub
    2.5 2.4 4.1
    2.5 2.6 3.8
    3.2 3 3.4
    Use the dot product between vectors to compute the similarity between the terms. Which one/s of the following is true?

    A.Tree and shrub are more similar compared to tree and plant.
    B.plant and shrub are more similar compared to tree and shrub.
    C.plant and tree are more similar compared to plant and shrub
    D.Plant and shrub  are more similar compared to plant and tree.
    E.plant and tree are more similar compare to tree and shrub.
    
    B,D
    

    8.Which one/s of the following is true about a million term vocabulary and word embedding.

    A.It can be represented by a 2 dimensional matrix.
    B.It can only be represented by a 1 000 000 dimensional matrix.
    C.It can be represented by a 1000 000 dimensional matrix.
    D.It cannot be represented by a matrix smaller than 1 000 000 dimensions.
    
    C
    
    1. Which one's of the following is true about embedded vector generation from neural networks.
    A.The neural net is trained using one hot representation.
    B.The number of output neurons is equal to the the number of dimensions in the embedded matrix.
    C.The number of output neurons is equal to the number of terms.
    D.The number of input neurons in the network is equal to the number of terms.
    E.The number of hidden layers neural network is equal to the number of terms.
    F.The weights for the hidden layer neurons is used as the term representation for a given dimension.
    G.The trained neural network is used to generate the embedded matrix in the output layer.
    
    A,C
    

    QUIZ 6

    1. Which one/s of the following is NOT true about nearest neighbour classifier?
    A.Multiple neighbours can be used to decide the category of the test object.
    B.Only one neighbour can be used to decide on the category of the test object.
    C.The algorithm needs a similarity function for computation of the distance between neighbours.
    D.It is the only algorithm that does not need similarity computation.
    E.The algorithm can only be used for classification problems with a single feature that is used to compute the distance between neighbours.
    
    B,D,E
    
    1. The diagram below repesents a KNN classification senario where the numbers on the lines represent the weight according to its nearness to the object (X) to be classified. Using K=9 and weighted voting scheme, what would the object X be classified as?


      image.png
    Blue circle
    
    1. In the daigram below, what would X be classified as using KNN (K=9)?


      image.png
    Red circle
    #图片种谁多就选谁
    
    1. When using KNN for text categorisation, the documents do not need to be vectorised.
    F
    
    1. Which ones of the following is true about a Naive Bais text classifier?
    A.The probablitiy of mulitple attributes appearing together is equal to the individual probabilities of each of the attributes multipled together.
    B.It assumes the the tokens are in the texts are independent of each other.
    C.The principle assumption of a NB classifier is the inter dependence of each of the attributes.
    D.The order of words or tokens in text is important.
    E.The probablitiy of mulitple attributes appearing together is equal to the sum of the individual probabilities of each of the attributes. 
    
    A,B
    
    1. Which ones of the following is text categorisation algorithms is NOT based on neural networks?
    A.Support Vector Machines
    B.Perceptron
    C.RNN
    D.Decision Trees
    E.CNN
    F.LTSM
    G.KNN
    
    A,D,G
    
    1. A validation dataset can be used for :
    A.Training a model
    B.Fine tuning the model parameters
    C.Can be used for either testing or training a model.
    D.Testing a model
    
    B
    
    1. In the diagram below, which one of the following is NOT true about the labels vector? Assume the Machine Learing Algorithm for this case is some form of Neural Network.


      image.png
    A.The labels vectors has to be 1x1, representing a single label.
    B.The labels vectors has to be at least a 2x1 matrix.
    C.The labels vector is a one hot representaion of the labels.
    D.The labels vectors can be any a nx1 dimension matrix where n is the number of labels.
    E.The labels vectors has to have the same dimensions as the feature vectors.
    
    A, E
    
    1. Which ones of the following is true about deep learning?
    A.As you move deeper into the neural network, the dimenstions of the matrix reduces.
    B.The size of the matrix can either reduce or increase as you go deeper into the layers depending on the kernel function.
    C.A softmax function is used in all of the layers of a deep learning neural network.
    D.It uses sliding window to select parts of the input matrix to extract selective features.
    E.The embedded matrix used in a Deep Learning Neural Network, is a 1xn matrix where n is the size of the vocabulary used.
    F.Kernels are used to select parts of the input matrix to construct a specific feature map.
    G.The output matrix of a Deep Learning Neural Network is always the same size as the input matrix.
    H.At the end of the "deep layers" all of the input values are fed into a fully connected layer which is then fed into a softmax function.
    
    A.D,F,H
    
    1. In the diagram below, which of the the following is NOT true about the circled feature vectors?


      image.png
    A.The dimensions of the feature vector circled in blue has to be exactly same as the dimensions of the feature vectors circled in red.
    B.The dimensions of the feature vectors circled in red has to be the same.
    C.The dimensions of the feature vector circled in blue can be different to the dimensions of the feature vectors circled in red.
    D.The dimensions of the feature vectors circled in red can be different depending on the size of the documents.
    E.The dimensions of the feature vector circled in blue  is always 1x1 representing the label for the document.
    
    C,D,E
    
    1. Consider the diagram below dipicting a text categorisation using a machine learning algorithm.
      Which of the following can not be used as a feature in feature vectors?


      image.png
    A.Frequency of numbers.
    B.The sentiment.
    C.Frequency of joining words.
    D.Frequency of sports related bigrams.
    E.TFIDF values for the terms in the document.
    F.The author of the document.
    G.The publisher.
    H.Frequency of trigrams containing the term "war"
    I.Frequency of profanities.
    J.The date of publication.
    K.The title from the document.
    L.Presence or absence of the phrase "climate change".
    M.Frequency of the POS tag "VBG"
    全选
    
    1. After training a model, its performance is ofter compared with a baseline model performance. Which ones of the following are true about a baseline model?
    A.A baseline model is always a Naive Bayes model.
    B.It is the most basic, naive model.
    C.Baseline is a special type of algorithm, which is used for comparison of other models.
    D.Baseline model is trained using only the validation data.
    E.It can be any type algorithm with a basic set of parameters without any attempt at fine tuning.
    
    B,E
    
    1. Which ones of the following are true about overfitting in classification problem modelling?
    A.A overfitted model will have a low training and test error and hence is the ideal model.
    B.An overfitted model will have a low training error and a high testing error.
    C.An overfitted model will have a high training error and a low testing error.
    D.Overfitting is a result of over training a model
    E.An overfitted model always over estimates values hence can result in higher error.
    B,D
    
    1. Which of the following statements are true regarding text categorisation.
    A.Euclidean distance cannot be used to categorise documents.
    B.Cosine similarity can be use to categorise a document.
    C.Any similarity measure can be used to categorise documents.
    D.Similarity measures cannot be used to categorise documents.
    E.When using a similairty measure between two documents, they will first need to be categorised.
    F.Similarity measurers can only be used to do binary categorisation.
    G.Only some similarity measure can be use to categorise documents.
    H.A Similarity measure can be use to do multi category classification.
    
    B,C,E,H
    

    15.Which one/s of the following is true about text categorisation?

    A.Multi category classificaiton cannot be done using an algorithm capable of doing only binary classification.
    B.Texts can be classified into 2 categories.
    C.Texts can be classified into multiple categories.
    D.Texts cannot be classified into multiple categories in a single step.
    E.Multi category classification can be done using iterative binary classification.
    
    B,C,E
    

    QUIZ 7

    1. Which of the following is NOT true about Named Entity Recognition?
    A.It is a typical classification problem.
    B.It can be done with only deep learning algorithm.
    C.It entails recognition of only Names of people and places.
    D.In essence, it is very similar to other NLP tasks such as POS tagging.
    E.Any classification algorithm can be used to do it.
    F.It not a classifcation problem
    
    B,C
    
    1. Which one/s of the following is true about use of Decision Trees to do NER?
    A.It is a Knowledge Engineering approach.
    B.It requires identification of attributes to use of the classification process.
    C.Its a highbrid between Knowledge Engineering and Learning approach.
    D.It is a Learning approach.
    E.It will have a high recall but low precision.
    A,B
    

    3.Which of the following is true about Knowledge Engineering based systems and Learning systems?

    A.The disadvantage of Knowledge Engineering bases system is that it required a lot of data.
    B.Knowledge Engineering systems are better suited for Deep Learning algorithms.
    C.Knowledge Engineering based systems can be developed with small amount of data.
    D.Learning systems are able to generalise better on unseen data.
    E.Learning systems are more suited to Deep Learning algorithms.
    F.Learning systems don't need any annotation
    
    C,D,E
    
    1. Which one/s of the following is true about the ouput from the following code.
      entity_names = []

    for tree in chunked_sentences:
    entity_names.extend(extract_entity_names(tree))

    print(len(entity_names))
    print(len(set(entity_names)))

    A.The second number in the output will always be smaller than the first.
    B.Either of the two numbers in the ouput could be larger.
    C.The second number in the output will always be larger than the first.
    D.There would be 2 numbers in the output.
    E.There will be only one number in the output.
    
    A,D
    

    5.Using techniques such as regular expressions to identify and label data and then feeding the data into a learning sytem is and example of :

    A.Bootstrapping
    B.Ad hoc learning
    C.Deep learning
    D.Unsupervised learning
    A
    
    1. Use the code snippet below to answer this qestion. What will be printed from the print statement on line 35?
    A.It will print the entity type followed by the content of array c, which could be one or more tokens
    B.It will print the entity type followed by the first element of the array c.
    C.It will print the entity type followed by a chunk contained in the array c.
    D.It will print the text "label" followed by its entity type.
    E.It will print the chunk label followed by two quote marks followed by the the chunk contained in array c.
    A,C
    

    7.Which ones of the following is true about BIO tags used for NER?

    A.It can be used with only non neural network type algorithms.
    B.It requires 2 steps to fully do NER.
    C.The second step (NEC) can be used to identify any number of names.
    E.It can be used in a deep learning system.
    F.It classifies the tokens into 3 categories.
    G.The second step (NEC) can be used to identify only 3 types of names.
    H.It can be used to classify tokens into any number of categories.
    B,C,E,D
    

    8.Which one/s of the following could be a reason for an error while running the following code.

     import nltk
     nltk.download('punkt')
    
     nltk.download('averaged_perceptron_tagger')
    
     nltk.download('maxent_ne_chunker')
    
     nltk.download('words')
    
    with open(DATA_DIR, 'r',encoding='utf-8', errors='ignore') as f:
    
         sample = f.read()
    
    sentences = nltk.sent_tokenize(sample)
    
    tokenized_sentences = [nltk.word_tokenize(sentence) for sentence in sentences]
    
    tagged_sentences = [nltk.pos_tag(sentence) for sentence in tokenized_sentences]
    
    chunked_sentences = nltk.ne_chunk_sents(tagged_sentences, binary=True)
    
    A.The syntax for the "nltk.download" statements are incorrect.
    B.The file path is not specified.
    C.Google Drive is not mounted.
    E.The import statement "import DATA_DIR" is missing.
    
    B,C
    
    A.It defines a function to extract multiple tokens representing entitiesof type PERSON.
    B.It defines a function to classify chunks into various types of entities.
    C.It defines a chunker which is later used to identify entities.
    D.It defines a function to extract multiple tokens representing various types of entities in the text.
    
    D
    

    相关文章

      网友评论

          本文标题:ASSIGNMENTS

          本文链接:https://www.haomeiwen.com/subject/ekqujdtx.html