Create a program that is able to learn human language

Assignment Help JAVA Programming
Reference no: EM131034796

Overview

For the first programming assignment you will work with your assigned partner to create a program that is able to "learn" human language and generate new sentences in the language. Its concept of language is somewhat limited: it knows only an estimate that the probability that a word wt will follow a sequence of (n   1) words wt-n+1, w2, ..., wt-1. In the natural language processing community, these are known as "n-gram" models, and they have proven to be very useful. You will observe that the order of the model, n, has a big effect on the kinds of "sentences" it generates. When it learns from a collection of Grimm's fairy tales, it produces things like:

- When n = 2: <s> i not upon the cat 'and as she was properly heated the peasants heard it grieves me to his nose to the tree but all that was about the stairs </s>

- When n = 3: <s> and the horse and rode into the jug at his cap on with the sack of meal that we should at least you might take a draught the maid 'what a maypole!' said she and was forced at last the boy 'or take yourself off out of her </s>

- When n = 4: <s> where have you been' said his father 'i have been travelling so long that i should like very well to find out where she is however' said the star-gazer as he looked through his maps but the castle was a garden and around it was a great deal better </s>

- When n = 5: <s> worse still she neglected to make the old woman's bed properly and forgot to shake it so that the boar jumped up and grunted and ran away roaring out 'look up in the tree there sits the one who is to blame' so they looked up and espied the wolf sitting amongst the branches and they called him a cowardly rascal and would not suffer him to come down till he was heartily ashamed of himself and had promised to be good friends again with old sultan the straw the coal and the bean in a village dwelt a poor old woman who had dim eyes could not see it and thought it very beautiful and said to himself 'i will not lose her this time' but however she again slipped away from him unawares and ran o
 towards home and as the prince followed her she jumped up into the pigeon-house and shut the door behind it and then the raging beast which was much too heavy and awkward to leap out of the window was made of  fine black ebony and as she sat looking out upon the snow she pricked her finger and three drops of blood fell upon it </s>

(Here <s> denotes a special \start-of-sentence" token and </s> a special end-of-sentence token.). The program \learns" by reading and gathering statistics from an input training text file.

You will implement this functionality in the LanguageModel class; a skeleton .java file with several dummy methods has been provided to you. The pre- and post-conditions for each method are specified; it will be your job to complete all of the empty methods according to those conditions. You are free to add as many additional private helper methods as you would like. Now that you have a sense of what you will be doing, let's take a look at how you will be working on the assignment.

Program 1 Specifications

File and Directory Naming Requirements-

- The writeup and all of your source code should be found directly in yourArchive/prog1, where yourArchive is replaced with the name of your actual zip archive.

- Your source code will be written in a Java file named LanguageModel.java (a skeleton of this file has been provided to you).

- Your writeup must be a plain-text file named writeup.txt.

Attachment:- assigment.zip

Attachment:- texts (1).zip

Reference no: EM131034796

Questions Cloud

How many facilitators in attendance : Writing portion of your reflection paper is to note the following: date, time, location and specific addiction focus of the group. Theme for that particular group session? Approximately, how many people were in attendance? How many facilitators in ..
What factors put children and families at risk : What protective factors of children help them succeed in school? What protective factors lead to resiliency for children and families in difficult circumstances?
Determine the coefficient of static friction : Determine the coefficient of static friction between the friction pad at A and ground if the inclination of the ladder isθ = 60 ° and the wall at B is smooth.
What federal initiatives in place to address current issues : What federal initiatives are in place to address current public health issues? Explain in detail with a minimum of two examples. What are the outcomes of these initiatives? Explain with examples.
Create a program that is able to learn human language : For the first programming assignment you will work with your assigned partner to create a program that is able to "learn" human language and generate new sentences in the language
What is the cdc''s procedure for mass immunizations : What is the CDC's procedure for mass immunizations that are necessary for certain types of infectious outbreaks such as influenza, mumps, and tetanus?
Evaluate given case study for appropriateness of response : Describe, in brief, the health issue in the case study as well as the response methods to the health issue in chronological order. Evaluate the case study for appropriateness of response by both local and state officials.
Problem regarding the financial security investments : David Brooks was one of the most liked managers at the Financial Security Investments. In an industry known for its cutthroat competitiveness, high employee turnover, low loyalty, and high employee mobility, the 20 brokers who reported to Brooks h..
Sort a n-element integer array with different elements : comparisons required by the Quicksort, and Mergesort algorithms to sort a n-element integer array with different elements

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a frame-based application that displays an array

Include a TextField in the South. When the user clicks a button, the course name should display in the TextField

  Display the value stored at the index

Display the value stored at the index. Take a screenshot to verify that the words in your Array or ArrayList are displayed successfully.

  Q1write a program called linearstringsearchjava that looks

q1.write a program called linearstringsearch.java that looks for a target string value in an array of string values.

  Create a complete java application that meets these

create a complete java application that meets these requirements1. the program has an opening comments section using

  Implement the finite field gf

Write a program called "GF2.java" to implement the finite field GF(p n )where p is a prime number andn is a positive integer.You also need to write four methodsto realize.

  Method splitstack that takes a stack

Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all the negatives appear on the bottom of the stack and all the non-negat..

  The application with all the specifications should be

the application with all the specifications should be developed based on a graphical user interface.1. implement proper

  Write the program using a for-loop and a break statement

Write a program that asks the user to enter a number that's positive and a multiple of 4. The user has three attempts to find such a number. Write the program using a for-loop and a ‘break' statement in the loop

  Create an overloaded constructor that provides values

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and -).

  Calculate the area and circumference of a circle

Write a program to move and calculate the area and circumference of a circle. - Calculate function, which passes the radius by value, and get back the area (PI*radius*radius) and circumference (2*PI*radius) of the circle through reference

  Write a program displaying a text file that is in a text are

Write a program displaying a text file that is in a text area. The user enteres a file name in a text field and clicks the view button; the file is then displayed in the text area. Do not use BufferedInputStream.

  Implement the application using a singly linked list

Implement the following application using a singly linked list. This application accepts from console and stores a list of 10 names of your friends in the singly linked list

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd