Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this question using python please: You will write a program train.py that takes texts from two languages to train a system

I need help with this question using python please:

image text in transcribedimage text in transcribed

You will write a program train.py that takes texts from two languages to train a system that will recognise the individual languages when a stream of 'unclassified' text is input to the system. The recogniser will be based on counts of characters, i.e. you will build a probability distribution of characters for each language. Input: a file containing the filenames of the languages - one filename per line. For example the input file might be called language_input_files.txt and contain the following two lines: english_training.txt french_training.txt The training text files should be in the format: _.txt For example, your program should be able to handle multiple training files for the same language which might then be named: french_training01.txt french_trainingo2.txt french_trainingo3.txt Consult these examples on how to read multiple lines from command line redirect. This will allow us to use our own test input files on your code, e.g. from the command line python train.py

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions