subject

Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented as strings) and the other vector contains a dictionary of abbreviations for those words (also represented as strings) in the same order. Write a function that reads a file string-by-string and returns the contents of the file to a string, with any abbreviated words or phrases in your dictionary that appear in the input file replaced by the corresponding word or phrase. You may use the following function prototype: string abbrToFull(string filename, vector abbrDict, vector fullDict);
Hint: Suppose your dictionary contains "National Science Foundation" (abbreviated as "NSF") and "Department of Defense" (abbreviated as "DoD"). Then, if the input file contains the following sentence: "UB's Department of Electrical Engineering receives a lot of research funding from the NSF and DoD", the function should return the following string: "UB's Department of Electrical Engineering receives a lot of research funding from the National Science Foundation and Department of Defense". For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
question
Computers and Technology, 25.06.2019 08:40
Anyone took cgs 1060 and took exam for simnet, slide 50 question on 1st exam.
Answers: 3
question
Computers and Technology, 25.06.2019 12:00
Jenny is the project manager and her company. she needs to break her current project into parts that her employees can work on. if jenny brings her project into as many small parts, but will lead to? a. increased quality control b. macro-management c. project disruption d. micro-management
Answers: 1
You know the right answer?
Assume that you have two vectors. One vector holds a dictionary of words and/or phrases (represented...
Questions
question
Mathematics, 08.04.2021 23:30
question
Biology, 08.04.2021 23:30
question
Mathematics, 08.04.2021 23:30