seb
fb8f61f868
Fix node-gyp compatibility: move to dependencies for proper version control
...
- Move node-gyp from devDependencies to dependencies
- Ensures v11.2.0 is used when installed as dependency
- Fixes Visual Studio detection issues in consuming projects
- Resolves shopApi build failures with old node-gyp v8.4.1
2025-06-27 03:37:33 +02:00
seb
091c258d41
Update package.json to include Node.js engine requirement and enhance build scripts. Add new keywords for better package discoverability, define repository information, and specify supported operating systems and CPU architectures. Introduce devDependencies for node-gyp to streamline native module compilation.
2025-06-27 03:32:24 +02:00
seb
8474c77163
Enhance search index handling by returning an empty array for no results instead of throwing an error. Improve memory management in free_words function by checking for NULL before freeing. Update search_index to properly return NULL when no results are found.
2025-06-27 03:15:45 +02:00
seb
21f527ba46
Update .gitignore to ignore npm lock file and tidy entry
...
Add package-lock.json to prevent accidental commits of npm’s lock
file. While here, remove the stray trailing space from the Thumbs.db
entry for a cleaner diff.
2025-06-23 07:09:30 +02:00
seb
462041654d
Optimize search result finalization by reallocating in place
...
Replace the malloc/copy/free sequence with a single realloc that
shrinks temp_results to its exact size and returns it directly. This
* eliminates an extra allocation and memory copy
* simplifies cleanup logic
* retains correct failure handling (temp_results unchanged on realloc
failure)
Also drop the superfluous trailing space at EOF and add package-lock.json
to version control to lock Node.js dependencies.
2025-06-23 04:16:18 +02:00
seb
60d609dd6a
Fix Windows compilation issue by adding malloc.h include
2025-06-21 21:14:20 +02:00
ccbd833361
package.json aktualisiert
2025-04-22 04:39:00 +00:00
24895fc1bc
similarity_search.c aktualisiert
...
3 -> 2 (min word length)
2025-04-22 04:35:04 +00:00
seb
a9a9247773
Refactor word similarity calculation in similarity_search.c to simplify scoring logic. Replace prefix matching with Levenshtein distance for improved accuracy, and adjust similarity scoring to boost results for small differences. Update overall similarity calculation to average word match ratio and average word similarity for better performance.
2025-04-18 19:01:22 +02:00
seb
e2aacaf54b
Refactor similarity_search.c to improve memory management and word splitting logic. Simplify split_into_words function to use a single allocation and update free_words to handle memory more efficiently. Enhance levenshtein_distance calculation with dynamic memory allocation and optimize similarity scoring in calculate_similarity function for better accuracy and performance.
2025-04-18 18:55:37 +02:00
seb
0dd17b794f
Update README.md to enhance documentation on similarity metrics and usage. Add dependencies section and clarify return values for methods. Modify test.js to reflect updated search scenarios and improve clarity in search results.
2025-04-18 11:03:07 +02:00
seb
92a7bad2b6
Implement Levenshtein distance calculation for improved word similarity in similarity_search.c. Adjust similarity thresholds and scoring logic to enhance accuracy, particularly for prefix matches and varying word lengths. Update test.js to reflect new search scenarios with lower similarity thresholds.
2025-04-18 09:47:58 +02:00
seb
e94c034927
Refine word similarity calculation in similarity_search.c by enforcing exact matches for short words and adjusting similarity thresholds. Increase weight of word matches in overall similarity score calculation.
2025-04-18 09:32:44 +02:00
seb
53da84fbcf
Update version to 1.0.1 in package.json for release.
2025-04-18 09:24:41 +02:00
seb
cd41ca2f52
Add word similarity calculation to enhance overall similarity scoring in calculate_similarity function. Implement character matching logic and boost score for same-length words.
2025-04-18 09:20:44 +02:00
seb
6091cc0b80
Increase default capacity in SearchIndexWrapper and enhance similarity calculation in calculate_similarity function to boost similarity score when all query words are found. Update MAX_WORDS and MAX_STRING_LEN definitions for improved handling.
2025-04-18 09:16:26 +02:00
seb
ca2c86ce33
upd
2025-04-18 09:06:34 +02:00
seb
da5e7476a0
Implement input validation for string length and index capacity in similarity_search_addon.cc and similarity_search.c; enhance memory management in search_index function.
2025-04-18 08:57:35 +02:00
seb
de950fa11c
Enhance string handling in similarity_search.c with input validation and memory management improvements; update test.js to utilize new SimilaritySearch class for index creation.
2025-04-18 08:52:18 +02:00
seb
8c51ff23f6
Remove compiled binaries and package-lock.json from the project.
2025-04-18 08:23:44 +02:00
seb
51a3cc6c2d
genesis
2025-04-18 08:22:35 +02:00