Questions tagged [speller-check]
The speller-check tag has no usage guidance.
32
questions
0
votes
1
answer
42
views
Everything is correct in my Check50 but in program I have other ERRORS - PSET05 Speller
I hope you're doing well and I also hope you might help me. When I run my CHECK50 in my speller program. Everything is correct all green, but when I run my program or valgrind I have some errors. And ...
0
votes
0
answers
14
views
What's wrong in my Speller.c? dictionary.c Errors Help! [duplicate]
I've been doing the dictionary.c file and I've completed all the required functions. When I run ./speller texts/lalaland.txt, it prompts some misspelled words that are not in keys/lalaland.txt file, ...
0
votes
1
answer
44
views
PSET5 Speller - Problem with Check Function
There seems to be a problem with my check function that I cannot get to the bottom of.
It's showing correctly spelled words as misspelled. For instance, the final check of check50 fails because my ...
0
votes
1
answer
32
views
PSET 5 Speller Issues with Check
for Speller in Pset 5, I am having issues with my check function, not sure how to deal with words with apostrophe and need some tips if possible. The issue should be with the check function of my ...
0
votes
1
answer
37
views
Pset5 Speller - Got "Conditional jump or move depends on uninitialised value(s)", "Use of uninitialised value of size 8" by check50
I try my code here to solve the pset5 - speller question, it seems pretty ok with locally run my valgrind. But when I use check50 to check it. One error(and only 1) happened.
I tried to assigned ...
0
votes
1
answer
29
views
Speller pset 5 my code is not working for substrings
I'm not sure why this is happening especially because it doesn't happen for cat
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <...
0
votes
1
answer
59
views
Speller perfomance question
I've completed speller and passed all checks. But I'm still bugged about the performance. I did my best with research and running tests, but my implementation is slower by 10-20% compared to staff's ...
0
votes
1
answer
100
views
Speller: Valgrind Still Reachable Error
after scouring the internet for multiple solutions to my Valgrind issue I cannot seem to find any that is specific to my code. I've spent hours coding this and Check50 gave me the green light except ...
0
votes
1
answer
57
views
Help with check function (PSET5)
My check function is counting the right amount of words in dictionary and text, but it outputs words that are not misspelled.
Here are all the functions of the problem, the arrays are used to locate ...
0
votes
1
answer
49
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
1
answer
196
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
1
answer
40
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
1
answer
127
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 ...
1
vote
1
answer
688
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
1
answer
80
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
1
answer
60
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
1
answer
104
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
1
answer
365
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
1
answer
435
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
1
answer
95
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
2
answers
250
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
1
answer
29
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
1
answer
51
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
1
answer
48
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
1
answer
140
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
1
answer
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
1
answer
558
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
1
answer
115
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
1
answer
1k
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
1
answer
668
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
1
answer
135
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
1
answer
71
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"
...