Commit Graph

43 Commits

Author SHA1 Message Date
Al
8a022698ee [fix] transliteration bug causing potential infinite loop, closes #351, closes #378 2019-02-13 04:01:29 -05:00
Al
2290b0991e [fix] transliteration case where a context no match comes at the end of the string 2018-02-06 15:08:11 -05:00
Al
fa40a7e87c [fix] initialize repeat_state_end in transliteration. Couldn't reproduce the conditional jumps in #308, but this seems to be where they're occurring, and it's generally good practice to initialize things 2018-01-21 16:24:19 -05:00
AeroXuk
26ac9ab5c2 Removing EXPORT statements from all source files and most header files, leaving only the exports for the main API in libpostal.h. Modified Makefiles so that all the test apps build without having extra functions exported from libpostal. 2017-11-25 04:35:28 +00:00
AeroXuk
f0246e7333 Fix bug in strndup fix for windows. Move all includes out of headers and into code for strndup.h and move it to be the last include. 2017-11-23 19:11:25 +00:00
AeroXuk
f07ab765cb Adding the export marker to all functions used in tests. 2017-11-20 20:58:37 +00:00
Al
b320aed9ac [merge] merging master 2017-01-13 19:58:49 -05:00
Al
df89387b5c [fix] calloc instead of malloc when performing initialization on structs that may fail halfway and need to clean up while partially initialized (calloc will set all the bytes to zero so the member pointers are NULL instead of garbage memory) 2017-01-13 18:30:04 -05:00
Al
8b9702b43d [error handling] Checking that resize succeeded in transliterate.c 2016-08-21 19:43:09 -04:00
Al
510f12ff96 [fix] Log error in transliteration if setup hasn't been called 2016-03-21 18:06:02 -04:00
Al
d35f97f6f1 [fix] All file_read_uint64 calls that use stack variables read into a uint64_t not a size_t so as not to smash the stack under a 32-bit arch (issue #18) 2016-02-29 22:36:00 -05:00
Al
af5689ee52 [fix] removing unused var 2016-01-17 21:00:17 -05:00
Al
19173d3a6e [transliteration] In set match checks, use the current index, not current index - char_len 2015-12-23 13:12:30 -05:00
Al
c7fb7f685d [transliteration] Fixing group replacement in transliteration in the case of multiple groups, not adding to phrase length when checking context 2015-12-21 16:06:04 -05:00
Al
39e83961ef [fix] Bug in suffix expansion affecting inseparable suffixes like burg as well as ordinal suffixes like first=>1st 2015-12-19 01:30:08 -05:00
Al
746b5d0f34 [fix] transliterate using string_equals 2015-12-02 13:09:43 -05:00
Al
1a1d74785c [fix] Compiler warnings for casts/printf 2015-10-26 18:52:18 -04:00
Al
080ccf0ddd [fix] logging warnings in transliterate 2015-10-12 13:50:42 -05:00
Al
12816d0e95 [api] Setting global objects to NULL on teardown 2015-09-28 17:27:57 -04:00
Al
d5ec005787 [transliteration] Similar init method for transliteration 2015-09-16 21:14:02 -04:00
Al
e122824448 [expansion] Adding the ability to search address dictionary phrases with a NULL language, will return phrases in any language 2015-09-15 14:00:26 -04:00
Al
9712e0fa87 [fix] phrase start in transliteration 2015-08-11 23:09:49 -04:00
Al
fe4789a665 [fix] compiler warnings 2015-07-28 19:14:00 -04:00
Al
2ff8c0fd1e [transliteration] fixing length-based transliteration 2015-07-25 13:53:28 -04:00
Al
68a6d8ee33 [fix] return NULL from transliterator_read on failure 2015-07-21 00:58:01 -04:00
Al
9f697e0256 [transliteration] transliterate now using the new trie_get_data_at_index API 2015-07-20 16:47:56 -04:00
Al
46e51ae91e [transliterate] no need to strdup transliterator names if they are lowercased, breaking on NUL byte 2015-07-01 14:51:22 -04:00
Al
47efce4b7e [transliteration] Stopping set check loop on empty transition 2015-06-28 20:46:23 -04:00
Al
f0bf7e750c [transliteration] Fixing edge case in transliteration where a naked character fails context matching but the set-wrapped version matches 2015-06-28 15:19:19 -04:00
Al
4fbcb72368 [fix] utf8proc option 2015-06-25 10:07:37 -04:00
Al
bcee9832b3 [utils] cstring_array_get_token=>cstring_array_get_string 2015-06-25 10:05:35 -04:00
Al
077e7fd5e2 [transliteration] Adding script/language lookups and I/O 2015-06-23 15:35:52 -05:00
Al
2e54ca3575 [transliteration] including script data file, adding len to transliterate API for tokenized transliteration 2015-06-21 05:42:20 -05:00
Al
bc306fc6c8 [fix] removing unused vars 2015-06-18 00:33:03 -04:00
Al
8792c38b52 [transliteration] Getting pre-context matching correct for > 1 char contexts, refining pre/post context matching in cases with an empty transition or an empty repeat, falling back to the original character in cases e.g. if there are Latin characters in a Hangul token 2015-06-17 23:51:19 -04:00
Al
3030dbe4be [fix] transliteration states 2015-06-05 00:09:29 -04:00
Al
9bdf118423 [transliteration] Fix to transliteration in cases where the pre/post context doesn't match and we fall back to the no-context match 2015-06-03 22:58:29 -04:00
Al
760714a234 [fix] warnings in transliterate.c 2015-06-03 19:29:35 -04:00
Al
664d5e90db [fix] Removing the stub comment and a few more random comments 2015-05-29 20:10:44 -04:00
Al
06318a6fab [fix] logging code 2015-05-29 20:08:49 -04:00
Al
55568e9ffa [fix] Removing commented out section 2015-05-29 20:01:17 -04:00
Al
583cadd44f [transliteration] transliterate implementation from trie (need to build/save the tables first) 2015-05-29 19:59:45 -04:00
Al
b983a83a89 [transliteration] transliteration struct definitions, memory allocaiton, builder methods and I/O, stubbing transliterate method for the moment 2015-05-16 23:23:25 -04:00