Questions tagged [speller-check]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

Speller skips last word in testfile I use

The title speaks for itself, but here is a bit more in-depth explanation. While my check() function runs, it always skips the last word in whatever file it is checking out. The source code for my ...
0
votes
1answer
44 views

pset5 speller check50 error - code doens`t handle max length (45char)

i get this error from check50 and i can t figure out why...: :( handles max length (45-char) words expected "MISSPELLED WOR...", not "MISSPELLED WOR..." everything else is green (...
0
votes
1answer
32 views

Can anyone see what is wrong with my check function?

#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <ctype.h> #include <strings.h> #include "dictionary.h" int s = ...
0
votes
1answer
24 views

pset5/speller Check produces a segfault if I introduce hash function

If I have a single bucket, the program runs seamlessly, however when I introduce the djb2 hash function as seen here the program produces a segfault. Here's my code with the hash function commented as ...
0
votes
1answer
118 views

Pset5: strcasecmp doesn't return 0 when given the same string input

// Implements a dictionary's functionality #include <stdbool.h> #include <strings.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> ...
0
votes
1answer
68 views

Speller beyond my reach: all words marked as misspelled

The spectre of Speller is haunting me. The code below compiles fine, but comes a cropper in at least two ways - first, it marks all words as misspelled (is my hash function flawed? or am I loading ...
0
votes
1answer
52 views

Speller.c doesn't work

I've spent pretty much time trying to solve a speller and got really stuck, don't know what's wrong with my code. It compiles but check50 says it's totally incorrect. I would be grateful if you could ...
1
vote
1answer
61 views

Check function (pset5, speller) gives multiple, incorrect outputs for some reason

I've completed most parts of speller, but for some reason, when I try to test the check function by printing a 0 for every time it is supposed to return true and printing 1 whenever it should return ...
0
votes
1answer
142 views

Pset 5: Code can't handle basic words and substrings properly

When I run my code, there is only one word in dictionary, so I am assuming that there is a problem with my load function, but I can't find where the problem is. Thank you! :) dictionary.c, ...
1
vote
1answer
258 views

My check function in speller isn't working

I have implemented everything else but this check function when I try to test it it seems like the the check function isn't working, because the no. of misspelled words is the same as the no. in text.....
0
votes
1answer
70 views

(PSET 5) Test for case-insensitivity fails

I used strcasecmp for comparing the words case-insensitively. However, check50 showed that I failed the test for case-insensitivity. I believe that my programme treated foO, fOo, Foo, fOO, FoO, FOo ...
0
votes
2answers
151 views

Unknown memory leak on “check function” - CS50 Speller

I have trying to decode the information gathered through valgrind with no success. I followed the hints given by valgrind trying too free the malloc'ed node *checker but to no avail. I've searched ...
0
votes
1answer
28 views

Speller (hashtable) check-function marks everything as correct

When using a small dictionary, everything is working fine. But with larger ones I'm getting output like this: MISSPELLED WORDS WORDS MISSPELLED: 0 WORDS IN DICTIONARY: 143091 WORDS IN TEXT: ...
0
votes
1answer
44 views

do not understand why check function checks new word against dictionary

I am trying to implement the check function of Speller in CS50. The code below may or may not work. But the thing that gets me is that I don't understand the bit : if strcasecmp(cursor-> word, ...
0
votes
1answer
43 views

Pset4 speller segmentation fault in check functions when using larger files like holmes.txt

I updated my hash function to make the code faster, it makes a hash table and stores word with the same first three letters in one linked list, i.e words starting with aaa will go together, words ...
0
votes
1answer
129 views

Pset 4: Speller (trie) - misspelled words

I'm stuck. In Speller, implemented with trie, I get more misspelled words than I should. The number of words loaded into the dictionary is correct, there are no leaks or error messages. When checking ...
0
votes
1answer
30 views

Problem with the check function in pset5

I am trying to get speller to work. I have not started writing the unload() and size() functions yet. Speller can be compiled but when I run it, it yields the error "dictionary.c:39:13: runtime error: ...
0
votes
1answer
283 views

PSET 5 Spell Checker - Error: Could not load dictionaries/large

I would be so grateful to anyone who can help me figure out this issue. After finally getting my code to compile I was met with the following terminal error when attempting to run the program: "...
0
votes
1answer
97 views

pset5 check - stuck in loop

My check function compiles, but gets stuck in a my while-loop when running. Using debugger, it looks like the values are set correctly for "word" in the node ("LA" from lalaland.txt), but the loop ...
0
votes
1answer
797 views

pset5 speller Invalid write of size 1

my implementation of dictionary.c passes all checks using check50 except memory leaks. I'm using valgrind and most of my leaks seem to be happening in my check function: // Returns true if word is ...
0
votes
1answer
654 views

Null pointer problem inside check function of pset5

I've been working very long on this and I can't find a way out. I've created a node struct and a hash struct. Like this: typedef struct node { char value[45]; struct node* next; }...
0
votes
1answer
123 views

I am working since past 4days on pset5 (speller) .All the words of dictionary are shown as mispelled. Please help me out. Thank You

My code misspells all the words of the text file.I have not made a single change to speller.c as mentioned in the instruction.I seem to have found out (using debug50) that my hash table is not getting ...
0
votes
1answer
58 views

problem with check function..please help

i have made some changes but it still prints all words as misspelled.can you please take a look at it??please define HASHTABLE_SIZE 1346 include include include include include "dictionary.h" ...