subject

Preparing text for the paradelle check. The poems that we aim to check are stored as values of type string in text files. But the read_file function above will return this data in a value of type char list option. We will need to break the input into a list of lines of text, removing the blank lines, and also splitting the lines of text into lists of words. We need to write a function called convert_to_non_blank_lines_of_words that takes as input the poem as an OCaml char list and returns a list of lines, where each line is a list of words, and each word is a list of characters. Thus, convert_to_non_blank_lines_of_words can be seen as having the type char list -> char list list list. We can use the type system to name new types that make this type easier to read. First define the type word to be char list by type word = char listThen define a line type to be a word list. Then, we can specify that convert_to_non_blank_lines_of_words has the type char list -> line list. In writing convert_to_non_blank_lines_of_words you may want to consider a helper function that breaks up a char list into lines, separated by new line characters ( '\n') and another that breaks up lines into lists of words. At this point you are not required to directly address the problems relating to capitalization of letters which we eventually need to address in checking that the same words appear in various parts of the poem. You are also not required to deal with issues of punctuation, but you may need to do something the be sure that words are correctly separated. For example, we would want to see that, barn as two words.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
question
Computers and Technology, 24.06.2019 19:30
Dtp allows you to manipulate text boxes in the following ways. more than 1 answer. a.move them b.rotate them c.resize them d.all of the above e.none of the above
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
What need most led to the creation of the advanced research projects agency network? darpa wanted scientists to be able to collaborate and share research easily. darpa wanted american and russian politicians to be able to communicate. darpa wanted astronauts to be able to contact nasa and the white house. darpa wanted factory owners to be able to coordinate supply chains.
Answers: 1
You know the right answer?
Preparing text for the paradelle check. The poems that we aim to check are stored as values of type...
Questions
question
Mathematics, 23.03.2021 20:10
question
Computers and Technology, 23.03.2021 20:10
question
English, 23.03.2021 20:10
question
Mathematics, 23.03.2021 20:10