I looked through the other topics but apparently they got further than I did.
I’m seeing the following errors when running mvn clean package on the project root folder after making all the required steps to add a new language:
[ERROR] Project 'org.languagetool:language-en:5.1-SNAPSHOT' is duplicated in the reactor @
[ERROR] Project 'org.languagetool:language-en:5.1-SNAPSHOT' is duplicated in the reactor -> [Help 1]
Running with -X for debug:
Exception in thread "main" java.lang.InternalError: a fault occurred in an unsafe memory access operation
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:514)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:422)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:416)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:415)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:425)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.eclipse.sisu.plexus.PlexusAnnotatedBeanModule.<init>(PlexusAnnotatedBeanModule.java:82)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:202)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:636)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:282)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
I don’t have maven installed on my machine, I’m running it through docker, it didn’t fail on the first mvn command at the beginning of the guide.
[ERROR] /opt/languagetool-language-modules/he/src/main/java/org/languagetool/Hebrew.java:[77,10] invalid method declaration; return type required
My repo was updated.
I’m not sure I did the right thing with changing AmericanEnglish and AMERICAN_ENGLISH to some native terms but I had to change it otherwise it won’t compile anyway, I guess this replacement is wrong and I’m not sure what to do with it.
You use many English-specific imports, but the languages are independent in LT. So, he will not have access to any English class. You should clean up Hebrew.java first, getting rid of all English-specific stuff. Many methods like createDefaultDisambiguator() have default implementation and you don’t need them to get started.
Adding rules is the next step. Once there’s a process in place for that, one would probably want to have a spell checker, I guess?
As long as you don’t have a part-of-speech tagger anyway, you can maybe just use online tools with a different language, but write rules for Hebrew anyway.