Find Jobs
Hire Freelancers

develop a simple spelling checker

$15-25 USD / hour

Cerrado
Publicado hace alrededor de 8 años

$15-25 USD / hour

This programming homework is to develop a simple spelling checker. The file [login to view URL] the documentView in a new window contains 25,025 frequently used words, each on a separate line in lowercase. Read the file, and insert the words into a hash table with 1373 buckets. Prompt for the name of an input text file to check. Read the document, and separate it into a sequence of words converted to lowercase. Use [login to view URL] (Links to an external site.) as an example way to convert. Using a hash table/function, print out a list of words that appear to be misspelled. A hash table contains buckets into which an object (data item) can be placed. When a hash function is applied to an object, a hash value is generated. The hash value is used to determine which bucket the object is assigned to. Hashed associated containers in STL have a constructor that takes the number of buckets and guarantees the bucket count will be at least that number. A bucket is a cluster (or a sub container) that holds a set of data items that hash to the same table location. Obviously, you can not store 25K words in 1373 slots and you need to use some kind of chaining schemes such as linear probing or the second hashing. The size of a bucket is independent from the number of data items you put into the hash. So if you have too many buckets, the hash will not have many collisions but you may waste the storage and you may have to deal with a rather complex hash function and longer keys. If you have too small number of buckets, then you have to deal with frequent collisions. Finding a good bucket number would play an important role in reducing collisions. That's why we usually pick a prime number for the number of bucket. We picked 1373 for the bucket number. You can use an STL for this project. and [login to view URL] (Links to an external site.) To set the hash you might use .hash_function() and to set the hash table size, you would use .rehash(). Like a vector note that the [ ] operators are assigned. Note that you still have to deal with collisions (either with linked lists or vectors) OR you take the easier way (less learning, but more practical) using [login to view URL] (Links to an external site.) (Make sure to compile with std=C++11). This auto increases the size of the buckets so you won't have collisions. OR You can implement your own hash, based on the textbook implementation but you need to come up with a scheme to include buckets (clusters) and collision resolution. Hash set from STL makes this very easy by using a constructor with a bucket value, although the exact bucket count may be reevaluated and altered by the library (it's OK for the homework. you don't have to constrain the program to use 1373 buckets) If you're implementing your own hash, here's a sample function to create a key from a string. Basically it uses a prime number and the character ascii values for the % function. class HFstring { public: unsigned int operator()(const string& item) const { unsigned int prime = 2049982463; int n = 0, i; for (i = 0; i < [login to view URL](); i++) n = n*8 + item[i]; return n > 0 ? (n % prime) : (-n % prime); } }; You don't have to interpret verb tense, plurals, conjugations etc. All you have to do is to check with each word with the dictionary.
ID del proyecto: 10273028

Información sobre el proyecto

7 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
7 freelancers están ofertando un promedio de $17 USD /hora por este trabajo
Avatar del usuario
I am compiler expert, I made our own script. I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$20 USD en 5 días
4,9 (141 comentarios)
7,0
7,0
Avatar del usuario
Hi, I’ve had a good look at your project description and I’m very interested in providing a solution. I am a preferred freelancer on freelancer.com within 1 year of my work on freelancer.com due to my skills and I have more than 4+ years of experience in c++ programming and algorithm building, so I can easily provide you with all of your desired work within a week with all of your requirements.
$15 USD en 40 días
5,0 (22 comentarios)
4,9
4,9
Avatar del usuario
Hi, client. I am a C++ programmer and mathematician. Please check my Profile/RecordList and consider hiring me. Looking forward to your response. Thanks.
$25 USD en 20 días
4,9 (26 comentarios)
4,5
4,5
Avatar del usuario
Hello, I am proposing the unordered_multiset implementation. This will result in a reliable implementation with just a few hours of development. Please don't hesitate to ask any questions. Regards, Yiannis
$15 USD en 10 días
5,0 (2 comentarios)
2,4
2,4
Avatar del usuario
Being a Masters student i solved hundreds of such assignments over the past 4+ 2 years. I rest my case here!
$15 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hey , I have a very good proficiency in both english and hindi And i have strong knowledge of programming in c and c++. i have good practice of data structures and apart from that I am a software developer for one of India's leading E-commerce company. so i think i would be the right choice for this project .so this work shouldn't be a lot of work and your project will be delivered to you well within time I have only started bidding on freelancer so i am willing to do this for free and only for a fair review . Really looking forward to hear from you . Thanks
$16 USD en 10 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
denver, United States
5,0
7
Miembro desde abr 20, 2016

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.