Enabling grammar engine
The grammar engine requires Java 17 or higher.
If PathToJavaVirtualMachine is empty, AppServer tries to auto-detect the JVM.
If needed, set the JVM path manually in AppServerX.xml.
You can also configure the grammar engine during installation:
Automated install on Linux (path_to_jvm)
Update AppServerX.xml
Locate AppServerX.xml in your WebSpellChecker installation directory:
<WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml
Find these tags:
JVMMaxMemorySizeMb(see Configure JVM maximum heap size)
Update the values as needed:
<!-- Java 17 or higher is required to use LanguageTool grammar engine. In case of empty tag AppServer tries to detect path to JVM library automatically. -->
<!-- You can put your path to JVM library here. Path example for Linux: '/usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so'. -->
<!-- Path example for Windows: 'C:/Program Files/Java/jdk-17/bin/server/jvm.dll' -->
<PathToJavaVirtualMachine></PathToJavaVirtualMachine>
<!-- Put maximum heap size restriction in megabytes for LanguageTool in Java Virtual Machine. -->
<JVMMaxMemorySizeMb>2048</JVMMaxMemorySizeMb>Verify operability
The status should show "active": true for the grammar engine.
Check the status:
{
"SpellCheckEngine": {
"active": true
},
"GrammarCheckEngine": {
"active": true
},
"EnglishAIModel": {
"active": true
},
"GermanAIModel": {
"active": true
},
"SpanishAIModel": {
"active": true
},
"EnglishAutocomplete": {
"active": true,
}
}Open the demo sample pages:
http(s)://<your_host_name>:<port>/<virtual_directory>/samples
Check
AppServer/Logs(for example,Child-0.log,Child-1.log).
You’ll see this error if AppServer can’t load the JVM:
MM/DD/YY:HH:MM:50.821 #18794:0 Subsystem_General Error Failed to load Java Virtual Machine (JVM). At least Java 17 is required to use the algorithmic grammar engine. You can specify a path to JVM in AppServerX.xml in the PathToJavaVirtualMachine tag.Related topics
Last updated
Was this helpful?

