Question: STUDY OF PROGRAMMING LANGUAGES HOMEWORK Write an ML program to find the acronyms of a given list of names. The main function will take as

 STUDY OF PROGRAMMING LANGUAGES HOMEWORK Write an ML program to find

STUDY OF PROGRAMMING LANGUAGES HOMEWORK Write an ML program to find the acronyms of a given list of names. The main function will take as parameter a list of string lists containing names such as the one given below: val y=[ [ "Light", "Amplification", "by" , "the" , "Stimulated" , "Emission", "of", "Radiation", ["The", "North", "Atlantic", Treaty", "Organization"]]; The program should find the acronym (first letters of each word) of each name where words with length less than 4 will not be included in the acronym. For example, for the following string list: ["Light, "Amplification", "by, "the", "Stimulated", "Emission", "of, "Radiation", The acronym will be found as "LASER", discarding short words ("by","the","of") in the name The program should return a record list containing the full names (as strings) and acronyms found as shown in the sample run Sample Run: -traverse(y)i val it = tacronym-"NASA" ,name "National Aeronautics and Space Administration", agEonYm "LASER", name-"Light Amplification by the Stimulated Emission of Radiation", (acronym "NATO" ,name-"The North Atlantic Treaty Organization"1]: nm list Notes: Use as many functions as you need. O You can use the following in your program: string operator for concatenation string function size to find the length of a string string function substring(atlj) to return a substring of size j starting at index i from the string st. . ake sure to define a type for the record For user-defined types, give the types of your parameters and/or return values in all your functions. STUDY OF PROGRAMMING LANGUAGES HOMEWORK Write an ML program to find the acronyms of a given list of names. The main function will take as parameter a list of string lists containing names such as the one given below: val y=[ [ "Light", "Amplification", "by" , "the" , "Stimulated" , "Emission", "of", "Radiation", ["The", "North", "Atlantic", Treaty", "Organization"]]; The program should find the acronym (first letters of each word) of each name where words with length less than 4 will not be included in the acronym. For example, for the following string list: ["Light, "Amplification", "by, "the", "Stimulated", "Emission", "of, "Radiation", The acronym will be found as "LASER", discarding short words ("by","the","of") in the name The program should return a record list containing the full names (as strings) and acronyms found as shown in the sample run Sample Run: -traverse(y)i val it = tacronym-"NASA" ,name "National Aeronautics and Space Administration", agEonYm "LASER", name-"Light Amplification by the Stimulated Emission of Radiation", (acronym "NATO" ,name-"The North Atlantic Treaty Organization"1]: nm list Notes: Use as many functions as you need. O You can use the following in your program: string operator for concatenation string function size to find the length of a string string function substring(atlj) to return a substring of size j starting at index i from the string st. . ake sure to define a type for the record For user-defined types, give the types of your parameters and/or return values in all your functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!