For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

1

Install Java 17+

Install JRE 17+ or JDK 17+ on the same server.

The grammar engine runs inside a Java Virtual Machine (JVM).

2

Update AppServerX.xml

Locate AppServerX.xml in your WebSpellChecker installation directory:

<WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml

Find these tags:

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>
3

Restart AppServer

Restart AppServer to apply changes in AppServerX.xml.

To restart: stop the application, then start it again.

Use Main AppServer commands.

4

Verify operability

The status should show "active": true for the grammar engine.

  1. Check the status:

{
    "SpellCheckEngine": {
        "active": true
    },
    "GrammarCheckEngine": {
        "active": true
    },
    "EnglishAIModel": {
        "active": true
    },
    "GermanAIModel": {
        "active": true
    },
    "SpanishAIModel": {
        "active": true
    },
    "EnglishAutocomplete": {
        "active": true,
    }
}
  1. Open the demo sample pages:

http(s)://<your_host_name>:<port>/<virtual_directory>/samples

  1. 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.

Last updated

Was this helpful?