2. Write R and python code to replace “bcz” with “because” in whole text? Answer R code: In R Sub() function can be used to find the text and with help of gsub(), text can be replaced: test <- "asdas bcz asdsd" gsub("bcz", "because", test) Python Code: In Python same can be achieved by using string.replace() function. our_str = 'Bcz I am there' import string new_str = string.replace(our_str, 'Bcz', 'Because') print(new_str) 3. How do you deal with the English text having Hindi words in between? Answer: There are two ways to treat hindi text between English words: Translate the Hindi Words to English: Lookup all the words in English dictionary and tag them as such Remove the Hindi Words: Using the words corpus from NLTK 4. Write R code to connect with this public API - Answer: Create a account on to get the api key Library(httr) Query <- Out<- GET(url=Query) 5.What are the different methods to deploy a model into production system? ANSWER:-Before deploying any models into productions, we should consider following points:a.Programming language like Java,C, VBb.Database and SQL scriptsc.Predictive model markup languaged.Schedulers I. What are my requirements? (i.e. how many requests are you expecting per second, what latency is required…etc) II. How will I evaluate the model’s performance in production? (and how will I collect and store the additional data from interactions) III. How frequently do I plan on re-training my model? IV. What are the data preprocessing needs? V. Will the format of the production input data differ drastically from the model training data? Will it come in batches or as a stream? VI. Does the model need to be able to run offline? Broadly the methods can be categorized into two: I. Online deployment models: Data mining tools like RevoDeployR or Orange or using Webframework II. Offline deployment Modes:
You've reached the end of your free preview.
Want to read the whole page?