NLModel won't initialize in MessageFilterExtension

i'm trying to create an NLModel within a MessageFilterExtension handler.

The code works fine in the main app, but when I try to use it in the extension it fails to initialize. Just this doesn't even work and gets the error below.

Single line that fails.
SMS_Classifier is the class xcode generated for my model. This line works fine in the main app.

let mlModel = try SMS_Classifier(configuration: MLModelConfiguration()).model

Error
Unable to locate Asset for contextual word embedding model for local en. MLModelAsset: load failed with error Error Domain=com.apple.CoreML Code=0 "initialization of text classifier model with model data failed" UserInfo={NSLocalizedDescription=initialization of text classifier model with model data failed}

Any ideas?

Anyone have any ideas or suggestions on this? I've mostly had to give up using both BERT and ELMo based models, but static models seems to work fine.

NLModel won't initialize in MessageFilterExtension
 
 
Q