Package ch.privately.owas.nlp
Class OwasNlpCore
java.lang.Object
ch.privately.owas.nlp.OwasNlpCore
Entry point for the NLP SDK. Before using any classifier, the init
method should be
called.
To run the initialisation at application startup, call the init method in the onCreate() method
of your application.
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
OwasNlpCore.init(this);
}
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
init(android.content.Context context)
Initialise the SDK.static void
initAsync(android.content.Context context, OwasNlpInitialisationCallback callback)
Initialise the SDK asynchronously.static boolean
isLoaded()
Returns if the SDK has been initialised or not.
-
Method Details
-
init
public static void init(android.content.Context context)Initialise the SDK.- Parameters:
context
- The context to use to initialise the SDK.
-
initAsync
public static void initAsync(android.content.Context context, OwasNlpInitialisationCallback callback)Initialise the SDK asynchronously. Usually takes between 2 and 3 seconds.- Parameters:
context
- The context to use to initialise the SDK.callback
- Callback that is executed after the SDK initialisation.
-
isLoaded
public static boolean isLoaded()Returns if the SDK has been initialised or not.- Returns:
- true if the SDK has been initialised.
-