Repository navigation
Load pre-compiled NLP++ analyzers (engine 3.7.11 + ICU preload) - #37
Merged
ddehilster merged 1 commit intoJul 14, 2026
Merged
Conversation
Bump the nlp-engine submodule to v3.7.11 (82ff50e), which loads a compiled analyzer/KB as a single combined DLL and lazy-opens *-full.dict/*-full.kbb at runtime in compiled mode. Fix the real reason analyze(..., compiled=True) failed with "[Couldn't load library: bin/kb.dll]": a compiled analyzer DLL imports icuin<ver>.dll + icuuc<ver>.dll by their real names and is dlopened by the engine via a plain LoadLibrary(fullpath), whose dependency resolution only consults already-loaded modules (by base name), the DLL's own dir, or PATH -- not os.add_dll_directory. delvewheel's default repair mangled the vendored ICU names and never vendored icuin (our extension only imports icuuc/icudt), so the analyzer's ICU imports went unresolved. - NLPPlus/__init__.py: _preload_icu() ctypes-loads every vendored icu*/msvcp* DLL by real name at import (dep order icudt -> icuuc -> icuin) so a compiled analyzer binds them from memory. - publish.yml: repair wheels with `delvewheel --no-mangle-all --add-dll icuin78.dll` so released wheels keep real ICU names and vendor icuin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes
analyze(..., compiled=True)load and run a pre-compiled NLP++ analyzer (single combined DLL deploy) from a fresh engine and produce correct output.Changes
82ff50e): combined analyzer+KB DLL; lazy-opens*-full.dict/*-full.kbbat runtime in compiled mode.NLPPlus/__init__.py:_preload_icu()ctypes-loads every vendoredicu*/msvcp*DLL by real name at import (dep order icudt → icuuc → icuin)..github/workflows/publish.yml: repair wheels withdelvewheel --no-mangle-all --add-dll icuin78.dll.Root cause of
[Couldn't load library: bin/kb.dll]A compiled analyzer DLL imports
icuin<ver>.dll+icuuc<ver>.dllby real name and isdlopened via a plainLoadLibrary(fullpath), whose dependency resolution only consults already-loaded modules (by base name), the DLL's own dir, or PATH — notos.add_dll_directory. Default delvewheel repair mangled the ICU names and never vendoredicuin(the extension only importsicuuc/icudt), so the analyzer's ICU imports went unresolved. Keeping real names + force-vendoringicuin+ preloading them by name fixes it.Verification (Windows, cp313)
Fresh temp-dir engine, copy only
compiled/TextGen,analyze(..., compiled=True):[Loaded compiled KB library],[Loaded compiled analyzer], all fouren-*-fulllazy files open,output.txt→Fee $715.00.,verify.jsonproduced. Interpreted path unchanged.Note
Per-render
data.kbboverride (B=$999) is out of scope: in compiled mode the engine reads only lazy*-fullfiles, and the samplecompiled/TextGenbakes its devdatainto the DLL — that belongs to the analyzer/deploy side.🤖 Generated with Claude Code