Questions tagged [check]

The tag has no usage guidance.

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

pset5 compiling but not functioning

I just rubber ducked my code and I still don't understand where my logic is failing for my code. It compiles but does not produce an expected outcome, if I could be pointed in the right direction it ...
0
votes
1answer
32 views

My program of speller give me so much misspelling words!!

I don't know what I'm doing wrong :s . I'm using the trie to organized the data. This is my implementation of check : // difference between the number Ascii of the letter and it's index in the ...
0
votes
0answers
45 views

can’t pass valgrind in pset5

I don’t know where is the error and when i use help50 that what i get and here is the code unsigned long hash(char* str); int count ; int table_size = 18788; typedef struct node { char word[...
0
votes
1answer
57 views

pse5 ttrie less misspelled words and size not working

please help me figure out why am getting wrong mispelt words and 0 size.below is is my load , check and size: bool load(const char *dictionary) { // TODO FILE *fp=fopen(dictionary,"r"); if(fp==NULL) {...
0
votes
1answer
90 views

segmentation fault in speller, but gbd exits with status 0?

I'm getting a segmentation fault. It came up when I added check() into dictionary.c (been writing mini programs to test my functions in isolation whenever possible), but decided to continue and fight ...
0
votes
1answer
69 views

can I just return trav->is_word from check?

I've been struggling terribly w/speller. Most recently the check function. I'm troubled by how convoluted my code looks because I see it as indicative of convoluted logic. I most recently generated a ...
0
votes
1answer
125 views

Pset5 Last frown to turn upside down!

I've been slogging away at speller for about 2 weeks now and im tripping over the last hurdle. heres what my check50 was spitting out https://cs50.me/checks/41dd8b60a432fa6adcd672274f3452ba6eedfda3 ...
0
votes
1answer
305 views

Mario check50 timeout

I have a timeout problem when I'm checking the more comfortable version of mario app. When I'm running it by myself it works fine, but check50 returns time out in some cases, for example:" :( rejects ...
1
vote
1answer
1k views

PSET5 - spell checker. How can I make my code faster?

My code for pset5 works reasonably well, it passes check50 and isn't orders of magnitude slower than the staff solution, but I'm just wondering where I am losing time. I'm running my code on the large ...
0
votes
1answer
55 views

pset5 dictionary issues with wrong number of misspelled words in check using trie

My check function does not get the correct amount of misspelled words. It's always higher than it should be. I figure there must be something wrong with my logic but I can't figure out what. I get the ...
0
votes
1answer
472 views

Update50 not working, can't check assignment, cant submit

I know the first question has been asked, but the previous posts I went into didnt help. update50 error: The following extra packages will be installed: ide50 0 upgraded, 0 newly installed, 0 to ...
0
votes
1answer
279 views

PSet 5 Speller Compiles, but Not Producing Output

My spell checker compiles, but doesn't appear to be producing anything when I attempt to run it. It prints "Mispelled Words" and then nothing else, so I suspect my error is in check. Here is what that ...
0
votes
1answer
181 views

pset6 how do we check for string in mario

I've tried to find out how to check for string input for mario.py. I know to check for the range of integers when getting input from the user, but if they enter a string instead of a number, is there ...
0
votes
1answer
171 views

Pset5: Check returns all as misspelled (trie)

I can't, for the life of me, figure out why my check function doesn't work properly. I have triple-checked my load() every way I know how and believe the data structure is properly setup. Why doesn't ...
0
votes
1answer
2k views

pset 5: load, check, unload and size runs but speller.c returns all words as misspelled

Initial Problem I have cleaned up my code but I still can't seem to solve the problem of my speller.c returning all the words in a text file as misspelled. Checking my solution against the staff's ...
0
votes
1answer
43 views

Pset5 Speller constantly giving seg fault

My implementation of load and check keep giving a seg fault when speller is executed. I've looked through questions with a similar problem, and I've tried everything - I've made sure that head is not ...
0
votes
1answer
32 views

Misspelled word not identified properly in check()

In my check function I keep getting true (word is in dictionary) for some words which I did not load into the dictionary. bool check(const char *word) { node *current = &root; // ...
0
votes
1answer
231 views

Pset 5 Speller Check/Load Entries in Hashtable All Have Same Memory Address

I'm working on speller and am having problems with my check function. I thought that my load function is working right, I'm not getting any errors or memory leaks. But, when I look in my hashtable ...
0
votes
1answer
71 views

Only last word in dictionary is spell checked correctly

The load function is loading the dictionary correctly (to the best of my knowledge). I have confirmed this by stepping through it in the debugger and watching the values change in the trie in the ...
0
votes
1answer
378 views

Pset5 dictionary.c load and check: returning all words as misspelled?

Hi guys i've been spending hours on pset5 and for some reason it's showing all words as misspelled, i've checked ppl asking similar question but still couldn't get an answer, any suggestions would be ...
0
votes
1answer
81 views

pset 5 load() trie implementation not correctly handing '\n' or '\0' characters

I've searched extensively for someone with a similar problem in the forums, but I have yet to find an answer. I have implemented load() with a trie. With my implementation of load() in pset5 "...
0
votes
1answer
53 views

pset2 initials if statement not checking

I've debugged the code below and noticed the program checks the if statement inside the for loop but doesn't run the code inside even when the statement is true. Why is this? Thanks in advance! #...
0
votes
1answer
99 views

Pset 5 speller trie check function - check50 handles everything but possessives and substrings

this part seemed pretty straight forward. Am I missing something in my syntax or is it something more complicated in my check function that I'm missing? Cheers! :( handles possessives ...
0
votes
1answer
94 views

Pset5 all words are misspelled and Valgrind reports 15 errors

I can compile pset5 but when I run the program, it treats all words misspelled. Also, Valgrind reports 15 errors and help50 hints that I am trying to access 1 byte of memory that isn't mine. I have no ...
1
vote
1answer
208 views

pset5 check - do i need to allocate for '\0'? Also, do i need to strcpy when dealing with Const Char and Char?

So I'm building a side code to print out results before implementing onto pset5 dictionary.c I'm getting a seg fault stating i did not initialise the values, can someone help me out? Do i actually ...
0
votes
1answer
207 views

pset5 (check) - can't pass word to hash function - error with var type

I'm really struggling with this one! I've just about got through to the last section I have to complete and I have two issues that I know of (I can't get 'check' to work so I don't know if 'load' is ...
0
votes
1answer
91 views

Help with Check Function in Pset5

typedef struct node { bool is_word; struct node* children[27]; } node; node* root; bool freenode(node* crawler); bool is_word; int words; /** * Returns true if word is ...
0
votes
1answer
169 views

Pset 5 all words misspelled

I know that there have been a lot of posts about this, but even after reading all of them, I can't seem to figure out why my code won't run properly — it still says that all 19190 words in ...
0
votes
1answer
103 views

Trouble with Substrings in Check in Pset5

I have used a trie structure to implement my dictionary in pset5 and I believe my load() function is operating correctly, however I seem to be having trouble with checking substrings in the check() ...
0
votes
1answer
374 views

CS50 Pset5 Speller Trie Reports All Words As Misspelled, Check Not Working

My Speller Trie Code for CS50 reports all words as misspelled. I need some help please. It will compile and run. Valgrind doesn't report any memory leaks or errors. I don't think that the "check" ...
0
votes
1answer
80 views

PSET5 - Why am i getting segmentation fault after correctly finding some mispelled words?

After i finished the code for load() and check(), I ran speller to find out if it was running correctly. Unfortunately, after finding some mispelled words, I get a segmentation fault message. Can ...
0
votes
1answer
228 views

PSET5 - Trie Check Segmentation Fault

I have been trying with this code for some time and tried numerous permutations, however I am still struggling to get anywhere! I am very new to coding so please give any advice that will improve my ...
0
votes
1answer
91 views

Logic Error in speller.c - Can't open text file and also have doubts about load() and check()

I wrote check() and then I tried to test speller with dictionary/small and a text file I'd written myself, but the text file couldn't be opened. Is there a problem with the way I implemented load() ...
2
votes
1answer
890 views

pset 5 check function

I used hash table to store dictionary in pset5. In order to minimize run time, I chose to cite a hash function online instead of writing my own hash table of maybe 26 rows for 26 letters. I wrote the ...
1
vote
1answer
198 views

pset5 cs50 does not handle basic words properly

Can you please help with the following issue with speller from pset5 in cs50: When I run the cs50 check, I get that it does not handle basic words properly, I am guessing, my check function is not ...
0
votes
1answer
439 views

pset5 check function and const char* word

I think the biggest issue is at the beginning of check. In the first example, I tried altering its declaration (I know I shouldn't) and since words is not a constant anymore, it gets modified by ...
2
votes
1answer
85 views

PSET5 Speller / Dictionary - Seg Fault and Incorrect Check

"debug50 ./speller texts/alice.txt" doesn't return a segfault. It runs to completion. But "./speller texts/alice.txt" returns a segfault. Can I PM someone my code to take a look at? Why would running ...
0
votes
1answer
47 views

pset5 check fails possessives and substrings

Ok, so I'm stuck... I finally (hopefully?) got load to work correctly, ie no leaks or errors with valgrind, but now check is giving me a hard time. I only have 135 words misspelled; and it I fails ...
2
votes
1answer
182 views

CS50 PSET5 Won't Work With Apostrophes

I was testing my program with different texts and I found out that my code lists all words with apostrophes as misspelled, even though I have an if statement in my load function that checks for any ...
1
vote
1answer
163 views

CS50 PSET5 - Segmentation Fault

When I was testing my code, I found that my code gives a segmentation fault using the large dictionary and is unable to load/open the small dictionary. Is this a result of my load function? Thanks in ...
0
votes
1answer
64 views

pset 1 Greedy - check gives conflicting results

When I run the check on my greedy program, all outputs pass the test except for the negative value. At first I used the code as it is below (negative value asks for input again). This gives me the ...
0
votes
1answer
227 views

Capital letters and strcmp() issue in check function

First time posting a question but I have been struggling with this issue for about two weeks now. All words in the text file with capital letters are showing up as misspelled. I am also seeing an ...
1
vote
1answer
118 views

pset5 check function not working

I have tried to implement load/check function as best as I understand it. When I run it, it prints out all the words in the text as misspelled. I don't even know what is wrong with my code at all. ...
0
votes
1answer
402 views

CS50x Fall 2016, check50 doesn't work?

I'm a little behind on CS50x Fall 2016 right now, but I don't foresee having any issue catching up. I'm currently trying to use check50 in CS50 IDE for pset1, and I'm using the ID 2015.fall.pset1....
1
vote
1answer
50 views

Pset 5 - Question on check(), diff, and check50 (and I found it interesting)

With the help of @Blauelf and @Yuri Laguardia, I finally made my code working (my previous question here). Then I diff my own results with the staff's, and found that my check() function seem to be ...
0
votes
1answer
30 views

Array for storing hashtable has remaining NULL bytes after being loaded

My load() function updates a global array initialized to NULL. check() thereafter converts word to lowercase and stores it in a buffer. Most elements in the array store NULL, however sometimes a real ...
0
votes
1answer
31 views

Array for storing hashtable only updates some of its initial NULL bytes

My load() function updates a global array initialized to NULL. check() thereafter converts word to lowercase and stores it in a buffer. Most elements in the array store NULL, however sometimes a real ...
0
votes
1answer
77 views

My speller only deals with one word, despite me setting a new node for each iteration in load

This is my code for load and check... The speller finds only one word in the text then returns all the others as misspelt. I have seen someone here struggling with the same problem, and his/her issue ...
1
vote
1answer
48 views

PSET5 : Question about structs

Why if I declare following struct : typedef struct node { bool check; node* children[27]; } node; and now if I create a variable containing this struct : node* var; and now if I check the ...
0
votes
1answer
88 views

pset5 spellcheck, problem with load

Could someone please review this code as I am not sure why am I getting segmentation fault while trying to use ' in words in a dictionary. I am attaching the code of my load function. //////////////...