Commit graph

42 commits

Author SHA1 Message Date
Dale Weiler
a934e0fe4b Happy new year! 2014-01-01 06:24:16 -05:00
Dale Weiler
11179a2a71 Major header reworking, this respects the namespaces properly. Makes object dependency more obvious, allows for better make caches, and prevents misuse of library features, i.e use con_* instead of printf. 2013-06-04 02:47:07 +00:00
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
160e7cf7ee Remove trailing whitespace 2013-04-21 10:24:55 +00:00
Dale Weiler
bf6eb9432e Fix memleak and assignment for cached lengths in corrector 2013-02-01 06:22:29 +00:00
Dale Weiler
d7a47eb5f9 Ignore most memory comparisions by validating the lengths are the same first. Becomes O(log(n)) from O(n) for correct_exists. 2013-01-30 23:32:15 +00:00
Dale Weiler
a6ecc3cbc4 Cache lengths in corrector. This speeds up the corrector a little. 2013-01-30 23:22:03 +00:00
Dale Weiler
5f9f6c11b8 Get it compiling with C++ compilers again. 2013-01-30 06:49:50 +00:00
Dale Weiler
1916a6e339 Slightly larger code, but strategic inline for corrector stuff. Makes it a little faster on my RPi (unnoticable on my desktop though). 2013-01-30 06:36:00 +00:00
Wolfgang Bumiller
fa90d2d06e correction fix: don't try to create edits for an empty string 2013-01-10 21:09:44 +01:00
Wolfgang Bumiller
10c7f4f838 don't call correct_edit anew for each scope 2013-01-09 21:16:22 +01:00
Dale Weiler
ac5cc49840 remove a the 2013-01-06 12:28:27 +00:00
Dale Weiler
9a4e215179 Document the awesome hack 2013-01-06 12:24:05 +00:00
Wolfgang Bumiller
9c8ddb3771 An evil optimization to the trie, now has a fixed amount of branches and uses a char-to-index map to index into the branches... 2013-01-06 13:07:28 +01:00
Dale Weiler
1e17b5f696 Cleaner transformation calls (one less size_t for agruments). We can coalesce it in correct_edit. 2013-01-06 11:02:39 +00:00
Dale Weiler
0f4090402d No need to +1 for comparision in correct_known_resize 2013-01-06 10:37:09 +00:00
Dale Weiler
cfdeaf4786 Fix comments 2013-01-06 10:35:43 +00:00
Dale Weiler
056779d3b8 Remove trailing shitspace 2013-01-06 10:33:09 +00:00
Dale Weiler
a4c1e63637 Less pointer dereferences 2013-01-06 05:17:30 +00:00
Dale Weiler
cc7e1a3363 Screw you clang :-) 2013-01-06 05:14:57 +00:00
Dale Weiler
ee33b4e5cc A little faster, plus some more research 2013-01-06 05:13:19 +00:00
Dale Weiler
0c59274c54 This is a work of art, it deserve nice comments :) 2013-01-06 04:09:12 +00:00
Dale Weiler
d98cc564b1 Fixes and more documentation 2013-01-06 04:06:38 +00:00
Dale Weiler
44a7154f58 Add a notice 2013-01-06 03:52:37 +00:00
Dale Weiler
106db76b9d Use memcmp with strlen for correct_exists (it's a hell of a lot faster) 2013-01-06 03:34:56 +00:00
Dale Weiler
cc8558025b No more uninitialized 2013-01-06 03:33:21 +00:00
Dale Weiler
9841240aab Some more nicer loops 2013-01-06 03:29:55 +00:00
Dale Weiler
e2e4907b60 Nicer loops 2013-01-06 03:26:09 +00:00
Dale Weiler
7e87c61d78 Cleanups and documentation 2013-01-06 03:06:56 +00:00
Dale Weiler
294870c5ba Remove override macros 2013-01-06 02:41:15 +00:00
Dale Weiler
efecd160ca Remove an illegal mem_d 2013-01-06 02:40:36 +00:00
Dale Weiler
0fb089fbb7 Cleanup the pool system for correct.c. Use blubs correct_resize stuff. 2013-01-06 02:39:07 +00:00
Wolfgang Bumiller
8bc9d4b427 Committing an evil allocator and a trie to speed up the correction stuff 2013-01-05 19:09:36 +01:00
Wolfgang Bumiller
0e3bb0e4f4 Get rid of correct_strndup and correct_concat altogether, reduces each generated edit to a single alloc 2013-01-04 14:50:50 +01:00
Dale Weiler
36d02d010e Got rid of all the memleaks. We can now merge with master. 2013-01-04 11:53:40 +00:00
Dale Weiler
18b9473cf8 Itegration of corrector. Seems to be some leaks in the score keeping for the probability system. 2013-01-04 11:44:25 +00:00
Dale Weiler
d97e032fcf Cleanups and add the corrector to the makefile. Starting integration with the parser. 2013-01-04 10:05:41 +00:00
Dale Weiler
7ef051f58a Fix all the memleaks in the corrector. Holy shit, the amount of hours I wasted trying to find out where I left out ONE little free. 2013-01-04 09:46:22 +00:00
Dale Weiler
ab64706cc3 Fix another two leaks 2013-01-03 21:38:07 +00:00
Dale Weiler
2189dd4b85 Remove some memory leaks in the corrector. There is still some memory leaks that are proving impossible to fix. 2013-01-03 21:25:35 +00:00
Dale Weiler
861987e13e Work on "did you mean? <ident>" support for errors. Using a three-part Bayes Theorem expression (language model, error model and control mechanisim). 2013-01-03 19:44:13 +00:00